fixing
This commit is contained in:
parent
6d6cdc047b
commit
27e54e914a
2 changed files with 22 additions and 7 deletions
|
|
@ -100,6 +100,9 @@ export class AssignController extends Controller {
|
|||
createdFullName: request.user.name,
|
||||
updateUserId: request.user.sub,
|
||||
updateFullName: request.user.name,
|
||||
other4_desc: requestBody.other4_desc ?? "",
|
||||
other5_no1_desc: requestBody.other5_no1_desc ?? "",
|
||||
other_desc: requestBody.other_desc ?? "",
|
||||
};
|
||||
const before = null;
|
||||
const assign = await this.assignRepository.save(data, { data: request });
|
||||
|
|
@ -259,6 +262,9 @@ export class AssignController extends Controller {
|
|||
id: assign_id,
|
||||
updateUserId: request.user.sub,
|
||||
updateFullName: request.user.name,
|
||||
other4_desc: requestBody.other4_desc ?? "",
|
||||
other5_no1_desc: requestBody.other5_no1_desc ?? "",
|
||||
other_desc: requestBody.other_desc ?? "",
|
||||
};
|
||||
|
||||
await this.assignJobRepository.delete({ assign_id });
|
||||
|
|
@ -555,7 +561,11 @@ export class AssignController extends Controller {
|
|||
*
|
||||
*/
|
||||
@Get("")
|
||||
async GetAssign(@Query() assign_id: string, @Request() request: RequestWithUser) {
|
||||
async GetAssign(
|
||||
@Query() assign_id: string,
|
||||
@Query() isReport: boolean = false,
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
let _workflow = await new permission().Workflow(request, assign_id, "SYS_PROBATION");
|
||||
if (_workflow == false) await new permission().PermissionGet(request, "SYS_PROBATION");
|
||||
|
||||
|
|
@ -653,10 +663,16 @@ export class AssignController extends Controller {
|
|||
law_id: x.id,
|
||||
});
|
||||
|
||||
let description = await x.description;
|
||||
if (isReport) {
|
||||
const descriptionSplit = await x.description.split(" ");
|
||||
description = await x.description.replace(descriptionSplit[0], "");
|
||||
}
|
||||
|
||||
return {
|
||||
id: x.id,
|
||||
selected: assignLaw > 0 ? 1 : 0,
|
||||
description: x.description,
|
||||
description: description,
|
||||
status_select: x.status_select,
|
||||
};
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue