update status command
This commit is contained in:
parent
e28f554275
commit
5d268bdd6f
1 changed files with 6 additions and 3 deletions
|
|
@ -6125,12 +6125,13 @@ export class CommandController extends Controller {
|
||||||
@Body()
|
@Body()
|
||||||
body: {
|
body: {
|
||||||
refIds: string[];
|
refIds: string[];
|
||||||
|
status: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } });
|
const profile = await this.profileEmployeeRepository.find({ where: { id: In(body.refIds) } });
|
||||||
const data = profile.map((_data) => ({
|
const data = profile.map((_data) => ({
|
||||||
..._data,
|
..._data,
|
||||||
statusTemp: "REPORT",
|
statusTemp: body.status,
|
||||||
}));
|
}));
|
||||||
await this.profileEmployeeRepository.save(data);
|
await this.profileEmployeeRepository.save(data);
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
|
|
@ -6142,12 +6143,13 @@ export class CommandController extends Controller {
|
||||||
@Body()
|
@Body()
|
||||||
body: {
|
body: {
|
||||||
refIds: string[];
|
refIds: string[];
|
||||||
|
status: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const posMasters = await this.posMasterRepository.find({ where: { id: In(body.refIds) } });
|
const posMasters = await this.posMasterRepository.find({ where: { id: In(body.refIds) } });
|
||||||
const data = posMasters.map((_data) => ({
|
const data = posMasters.map((_data) => ({
|
||||||
..._data,
|
..._data,
|
||||||
statusReport: "REPORT",
|
statusReport: body.status,
|
||||||
}));
|
}));
|
||||||
await this.posMasterRepository.save(data);
|
await this.posMasterRepository.save(data);
|
||||||
if (posMasters && posMasters.length > 0) {
|
if (posMasters && posMasters.length > 0) {
|
||||||
|
|
@ -6169,12 +6171,13 @@ export class CommandController extends Controller {
|
||||||
@Body()
|
@Body()
|
||||||
body: {
|
body: {
|
||||||
refIds: string[];
|
refIds: string[];
|
||||||
|
status: string;
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
const posMasters = await this.posMasterActRepository.find({ where: { id: In(body.refIds) } });
|
const posMasters = await this.posMasterActRepository.find({ where: { id: In(body.refIds) } });
|
||||||
const data = posMasters.map((_data) => ({
|
const data = posMasters.map((_data) => ({
|
||||||
..._data,
|
..._data,
|
||||||
statusReport: "REPORT",
|
statusReport: body.status,
|
||||||
}));
|
}));
|
||||||
await this.posMasterActRepository.save(data);
|
await this.posMasterActRepository.save(data);
|
||||||
return new HttpSuccess();
|
return new HttpSuccess();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue