no message
This commit is contained in:
parent
c22da27f00
commit
181ec29d2a
1 changed files with 3 additions and 4 deletions
|
|
@ -4926,17 +4926,15 @@ export class CommandController extends Controller {
|
||||||
posMasters.map(async (item) => {
|
posMasters.map(async (item) => {
|
||||||
if (item.posMasterChild != null && item.posMasterChild.current_holderId != null) {
|
if (item.posMasterChild != null && item.posMasterChild.current_holderId != null) {
|
||||||
// ประวัติคำสั่งให้รักษาการแทน
|
// ประวัติคำสั่งให้รักษาการแทน
|
||||||
const dataAct = new ProfileActposition();
|
|
||||||
const _actposition = await this.actpositionRepository.find({
|
const _actposition = await this.actpositionRepository.find({
|
||||||
where: { profileId: item.posMasterChild.current_holderId },
|
where: { profileId: item.posMasterChild.current_holderId },
|
||||||
});
|
});
|
||||||
const data = _actposition.map((_data) => ({
|
const profileActs = _actposition.map((_data) => ({
|
||||||
..._data,
|
..._data,
|
||||||
status: false,
|
status: false,
|
||||||
dateEnd: _data.status == true ? new Date() : _data.dateEnd,
|
dateEnd: _data.status == true ? new Date() : _data.dateEnd,
|
||||||
}));
|
}));
|
||||||
await this.posMasterActRepository.save(data);
|
await this.actpositionRepository.save(profileActs);
|
||||||
item.posMasterChild.current_holderId;
|
|
||||||
|
|
||||||
const shortName =
|
const shortName =
|
||||||
item.posMaster != null && item.posMaster.orgChild4 != null
|
item.posMaster != null && item.posMaster.orgChild4 != null
|
||||||
|
|
@ -4968,6 +4966,7 @@ export class CommandController extends Controller {
|
||||||
lastUpdatedAt: new Date(),
|
lastUpdatedAt: new Date(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const dataAct = new ProfileActposition();
|
||||||
Object.assign(dataAct, metaAct);
|
Object.assign(dataAct, metaAct);
|
||||||
const historyAct = new ProfileActpositionHistory();
|
const historyAct = new ProfileActpositionHistory();
|
||||||
Object.assign(historyAct, { ...dataAct, id: undefined });
|
Object.assign(historyAct, { ...dataAct, id: undefined });
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue