no message

This commit is contained in:
kittapath 2024-09-24 09:45:43 +07:00
parent b797d3cceb
commit 22ae951626

View file

@ -74,13 +74,16 @@ export class CommandController extends Controller {
)
.andWhere(
status != null && status != undefined && status != ""
? "command.status LIKE :status"
? "command.status IN (:...node)"
: "1=1",
{
status:
status == null || status == undefined || status == ""
? null
: `${status.trim().toLocaleUpperCase()}`,
: status.trim().toLocaleUpperCase() == "NEW" ||
status.trim().toLocaleUpperCase() == "DRAFT"
? ["NEW", "DRAFT"]
: [status.trim().toLocaleUpperCase()],
},
)
.andWhere(
@ -149,7 +152,7 @@ export class CommandController extends Controller {
command.detailBody = commandType.detailBody;
command.detailFooter = commandType.detailFooter;
command.isAttachment = commandType.isAttachment;
command.status = "DRAFT";
command.status = "NEW";
command.issue = commandType.name;
command.createdUserId = request.user.sub;
command.createdFullName = request.user.name;