feat: update text desc scheduling loh
parent
0ddcd71245
commit
dc0dbf6ad3
|
@ -28,7 +28,7 @@ export class DataSchedulingChangeStatusHandler
|
||||||
|
|
||||||
const scheduleName = newData?.name || 'an item';
|
const scheduleName = newData?.name || 'an item';
|
||||||
const editorName = newData.editor_name || 'System';
|
const editorName = newData.editor_name || 'System';
|
||||||
const description = `<p><b>${editorName}</b> changed the status of <b>${scheduleName}</b> from <b><i>${oldStatus}</i></b> to <b><i>${newStatus}</i></b>.</p>`;
|
const description = `<div><b>${editorName}</b> changed the status of <b><i>${scheduleName}</i></b> from <b><i>${oldStatus}</i></b> to <b><i>${newStatus}</i></b>.</div>`;
|
||||||
|
|
||||||
const payload: DataSchedulingLogEntity = {
|
const payload: DataSchedulingLogEntity = {
|
||||||
type: SCHEDULING_LOG_TYPE_ENUM.DATA_SCHEDULING,
|
type: SCHEDULING_LOG_TYPE_ENUM.DATA_SCHEDULING,
|
||||||
|
|
|
@ -22,7 +22,7 @@ export class DataSchedulingCreatedHandler
|
||||||
const totalPercentage = decryptionTotal(data?.indexing_key);
|
const totalPercentage = decryptionTotal(data?.indexing_key);
|
||||||
|
|
||||||
const scheduleName = data?.name || 'a new schedule';
|
const scheduleName = data?.name || 'a new schedule';
|
||||||
const description = `<p><b>${data.creator_name}</b> created <b>${scheduleName}</b> schedule from <b><i>${data?.schedule_date_from}</i></b> to <b><i>${data.schedule_date_to}</i></b> with a total percentage of <b><i>${totalPercentage}%</i></b>.</p>`;
|
const description = `<div><b>${data.creator_name}</b> created <b><i>${scheduleName}</i></b> schedule from <b><i>${data?.schedule_date_from}</i></b> to <b><i>${data.schedule_date_to}</i></b> with a total percentage of <b><i>${totalPercentage}%</i></b>.</div>`;
|
||||||
|
|
||||||
const payload: DataSchedulingLogEntity = {
|
const payload: DataSchedulingLogEntity = {
|
||||||
type: SCHEDULING_LOG_TYPE_ENUM.DATA_SCHEDULING,
|
type: SCHEDULING_LOG_TYPE_ENUM.DATA_SCHEDULING,
|
||||||
|
|
|
@ -28,7 +28,7 @@ export class DataSchedulingDeletedHandler
|
||||||
|
|
||||||
const scheduleName = deletedData?.name || 'an item';
|
const scheduleName = deletedData?.name || 'an item';
|
||||||
|
|
||||||
const description = `<p><b>${deleterName}</b> deleted schedule: <b>${scheduleName}</b>.</p>`;
|
const description = `<div><b>${deleterName}</b> deleted schedule: <b><i>${scheduleName}</i></b>.</div>`;
|
||||||
|
|
||||||
const payload: DataSchedulingLogEntity = {
|
const payload: DataSchedulingLogEntity = {
|
||||||
type: SCHEDULING_LOG_TYPE_ENUM.DATA_SCHEDULING,
|
type: SCHEDULING_LOG_TYPE_ENUM.DATA_SCHEDULING,
|
||||||
|
|
|
@ -119,7 +119,7 @@ export class DataSchedulingUpdatedHandler
|
||||||
const editorName = newData.editor_name || 'System';
|
const editorName = newData.editor_name || 'System';
|
||||||
const itemName = oldData?.name || 'an item';
|
const itemName = oldData?.name || 'an item';
|
||||||
|
|
||||||
let description = `<p><b>${editorName}</b> has updated schedule for <b>${itemName}</b>.`;
|
let description = `<div><b>${editorName}</b> has updated schedule for <b><i>${itemName}</i></b>.`;
|
||||||
|
|
||||||
if (Object.keys(changingData.old).length > 0) {
|
if (Object.keys(changingData.old).length > 0) {
|
||||||
description += ` Change details:<ul>`;
|
description += ` Change details:<ul>`;
|
||||||
|
@ -135,10 +135,10 @@ export class DataSchedulingUpdatedHandler
|
||||||
newValue = `${newValue}%`;
|
newValue = `${newValue}%`;
|
||||||
}
|
}
|
||||||
|
|
||||||
description += `<li><b>${label}</b> changed from <i>${oldValue}</i> to <i>${newValue}</i>.</li>`;
|
description += `<li><b>${label}</b> changed from <b><i>${oldValue}</i></b> to <b><i>${newValue}</i></b>.</li>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
description += `</ul></p>`;
|
description += `</ul></div>`;
|
||||||
} else {
|
} else {
|
||||||
description += ` No significant data detail changes.</p>`;
|
description += ` No significant data detail changes.</p>`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue