diff --git a/src/modules/18_command/components/Main/DialogFormCommand.vue b/src/modules/18_command/components/Main/DialogFormCommand.vue index ef7f1c69e..2ed5152a0 100644 --- a/src/modules/18_command/components/Main/DialogFormCommand.vue +++ b/src/modules/18_command/components/Main/DialogFormCommand.vue @@ -35,8 +35,11 @@ async function fetchCommandType() { .get(config.API.commandType) .then(async (res) => { const data = await res.data.result; - listCommand.value = data; - commandOp.value = data; + listCommand.value = data.map((e: DataCommandType) => ({ + id: e.id, + name: e.subtitle ? `${e.name}(${e.subtitle})` : `${e.name}`, + })); + commandOp.value = listCommand.value; }) .catch((err) => { messageError($q, err); diff --git a/src/modules/18_command/interface/response/Main.ts b/src/modules/18_command/interface/response/Main.ts index 40c60bc25..87f915311 100644 --- a/src/modules/18_command/interface/response/Main.ts +++ b/src/modules/18_command/interface/response/Main.ts @@ -30,6 +30,7 @@ interface DataCommandType { lastUpdateUserId: string; lastUpdatedAt: string | Date; name: string; + subtitle: string; } interface DataFileDownload {