Commit 32749220 authored by Tình Trương's avatar Tình Trương

update

parent 37e665d2
...@@ -50,7 +50,7 @@ export enum ContactStatus { ...@@ -50,7 +50,7 @@ export enum ContactStatus {
inactive = 0, inactive = 0,
} }
export enum PolicyStatus { export enum ConfigSystemStatus {
active = 1, active = 1,
inactive = 0, inactive = 0,
} }
......
...@@ -474,6 +474,7 @@ export type ListConfigSystem = { ...@@ -474,6 +474,7 @@ export type ListConfigSystem = {
namePage: string; namePage: string;
title: string; title: string;
content: string; content: string;
url: string;
numIndex: number; numIndex: number;
status: number; status: number;
createTime?: string; createTime?: string;
...@@ -488,6 +489,7 @@ export type DetailConfigSystem = { ...@@ -488,6 +489,7 @@ export type DetailConfigSystem = {
title: string; title: string;
content: string; content: string;
numIndex: number; numIndex: number;
url: string;
status: number; status: number;
createTime?: string; createTime?: string;
createBy?: string; createBy?: string;
...@@ -501,6 +503,7 @@ export type UpdateConfigSystem = { ...@@ -501,6 +503,7 @@ export type UpdateConfigSystem = {
title: string; title: string;
content: string; content: string;
status: number; status: number;
url: string;
numIndex: number; numIndex: number;
createTime?: string; createTime?: string;
createBy?: string; createBy?: string;
...@@ -512,6 +515,7 @@ export type AddConfigSystem = { ...@@ -512,6 +515,7 @@ export type AddConfigSystem = {
namePage: string; namePage: string;
title: string; title: string;
content: string; content: string;
url: string;
numIndex: number; numIndex: number;
status: number; status: number;
}; };
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<q-form <q-form
greedy greedy
@submit.prevent=" @submit.prevent="
$emit('addUpdatePolicy', {}); $emit('addUpdateConfigSystem', {});
$emit('update:isOpened', false); $emit('update:isOpened', false);
" "
> >
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
<q-item-section> <q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{ <q-item-label class="text-h6 text-weight-regular">{{
isUpdate isUpdate
? $t('listPolicy.dialogLabel.titleAdd') ? $t('listConfigSystem.dialogLabel.titleAdd')
: $t('listPolicy.dialogLabel.titleUpdate') : $t('listConfigSystem.dialogLabel.titleUpdate')
}}</q-item-label> }}</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<q-input <q-input
:model-value="namePage" :model-value="namePage"
@update:model-value="$emit('update:namePage', $event)" @update:model-value="$emit('update:namePage', $event)"
:label="$t('listPolicy.dialogLabel.fieldLabels.namePage')" :label="$t('listConfigSystem.dialogLabel.fieldLabels.namePage')"
class="q-my-sm" class="q-my-sm"
type="text" type="text"
outlined outlined
...@@ -47,29 +47,39 @@ ...@@ -47,29 +47,39 @@
outlined outlined
clearable clearable
></q-input> ></q-input>
<div class="q-pt-sm q-pl-sm">
<span class="text-body1">{{
$t('listConfigSystem.dialogLabel.fieldLabels.status')
}}</span
><q-toggle
:model-value="status"
:true-value="ConfigSystemStatus.active"
:false-value="ConfigSystemStatus.inactive"
@update:model-value="$emit('update:status', $event)"
/>
</div>
</div> </div>
<div class="col-6"> <div class="col-6">
<q-input <q-input
:model-value="title" :model-value="title"
@update:model-value="$emit('update:title', $event)" @update:model-value="$emit('update:title', $event)"
:label="$t('listPolicy.dialogLabel.fieldLabels.title')" :label="$t('listConfigSystem.dialogLabel.fieldLabels.title')"
class="q-my-sm" class="q-my-sm"
type="text" type="text"
outlined outlined
:rules="titleRules" :rules="titleRules"
clearable clearable
></q-input> ></q-input>
<div class="q-pt-sm q-pl-sm"> <q-input
<span class="text-body1">{{ :model-value="url"
$t('listPolicy.dialogLabel.fieldLabels.status') @update:model-value="$emit('update:url', $event)"
}}</span :label="$t('listConfigSystem.dialogLabel.fieldLabels.url')"
><q-toggle class="q-my-sm"
:model-value="status" type="text"
:true-value="PolicyStatus.active" outlined
:false-value="PolicyStatus.inactive" :rules="urlRules"
@update:model-value="$emit('update:status', $event)" clearable
/> ></q-input>
</div>
</div> </div>
<div class="col-12"> <div class="col-12">
<div> <div>
...@@ -178,7 +188,7 @@ ...@@ -178,7 +188,7 @@
color="grey" color="grey"
no-caps no-caps
style="width: 90px" style="width: 90px"
:label="$t('listPolicy.crudActions.cancel')" :label="$t('listConfigSystem.crudActions.cancel')"
@click="$emit('update:isOpened', false)" @click="$emit('update:isOpened', false)"
/> />
<q-btn <q-btn
...@@ -186,7 +196,7 @@ ...@@ -186,7 +196,7 @@
color="primary" color="primary"
no-caps no-caps
style="width: 90px" style="width: 90px"
:label="$t('listPolicy.crudActions.save')" :label="$t('listConfigSystem.crudActions.save')"
/> />
</q-card-actions> </q-card-actions>
</q-form> </q-form>
...@@ -195,7 +205,7 @@ ...@@ -195,7 +205,7 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { PolicyStatus } from 'src/assets/enums'; import { ConfigSystemStatus } from 'src/assets/enums';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { i18n } from 'src/boot/i18n'; import { i18n } from 'src/boot/i18n';
...@@ -208,6 +218,7 @@ export default defineComponent({ ...@@ -208,6 +218,7 @@ export default defineComponent({
isUpdate: { type: Boolean, default: false }, isUpdate: { type: Boolean, default: false },
namePage: { type: String, required: true }, namePage: { type: String, required: true },
title: { type: String, required: true }, title: { type: String, required: true },
url: { type: String, required: true },
numIndex: { type: Number, required: true }, numIndex: { type: Number, required: true },
content: { type: String, required: true }, content: { type: String, required: true },
status: { type: Number, required: true }, status: { type: Number, required: true },
...@@ -216,17 +227,23 @@ export default defineComponent({ ...@@ -216,17 +227,23 @@ export default defineComponent({
const namePageRules = [ const namePageRules = [
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('listPolicy.validateMessages.requireNamePage'), i18n.global.t('listConfigSystem.validateMessages.requireNamePage'),
]; ];
const titleRules = [ const titleRules = [
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
i18n.global.t('listPolicy.validateMessages.requireTitle'), i18n.global.t('listConfigSystem.validateMessages.requireTitle'),
];
const urlRules = [
(val?: string) =>
(val && val.trim().length) ||
i18n.global.t('listConfigSystem.validateMessages.requireUrl'),
]; ];
return { return {
namePageRules, namePageRules,
titleRules, titleRules,
PolicyStatus, urlRules,
ConfigSystemStatus,
}; };
}, },
emits: [ emits: [
...@@ -234,10 +251,11 @@ export default defineComponent({ ...@@ -234,10 +251,11 @@ export default defineComponent({
'update:namePage', 'update:namePage',
'update:title', 'update:title',
'update:content', 'update:content',
'update:url',
'update:numIndex', 'update:numIndex',
'update:status', 'update:status',
'click:CloseBtn', 'click:CloseBtn',
'addUpdatePolicy', 'addUpdateConfigSystem',
], ],
}); });
</script> </script>
...@@ -959,33 +959,36 @@ export default { ...@@ -959,33 +959,36 @@ export default {
}, },
//Cấu hình chính sách //Cấu hình chính sách
listPolicy: { listConfigSystem: {
add: 'Thêm', add: 'Thêm',
toolTipMessageUpdate: 'Cập nhập', toolTipMessageUpdate: 'Cập nhập',
toolTipMessageDelete: 'Xóa', toolTipMessageDelete: 'Xóa',
title: 'Cấu hình Chính sách', title: 'Cấu hình hệ thống',
titleColumnsTable: { titleColumnsTable: {
stt: 'STT', stt: 'STT',
namePage: 'Tên chính sách', namePage: 'Tên cấu hình',
title: 'Tiêu đề', title: 'Tiêu đề',
url: 'Url target',
content: 'Nội dung', content: 'Nội dung',
numIndex: 'Vị trí', numIndex: 'Vị trí',
status: 'Trạng thái', status: 'Trạng thái',
action: 'Chức năng', action: 'Chức năng',
}, },
dialogLabel: { dialogLabel: {
titleAdd: 'Thêm Chính sách', titleAdd: 'Thêm Cấu hình',
titleUpdate: 'Cập nhập Chính sách', titleUpdate: 'Cập nhập Cấu hình',
fieldLabels: { fieldLabels: {
namePage: 'Tên chính sách *', namePage: 'Tên cấu hình *',
title: 'Tiêu đề *', title: 'Tiêu đề *',
url: 'Url target *',
numIndex: 'Vị trí', numIndex: 'Vị trí',
status: 'Trạng thái', status: 'Trạng thái',
}, },
}, },
validateMessages: { validateMessages: {
requireNamePage: 'Vui lòng nhập Tên chính sách', requireNamePage: 'Vui lòng nhập Tên Cấu hình',
requireTitle: 'Vui lòng nhập Tiêu đề', requireTitle: 'Vui lòng nhập Tiêu đề',
requireUrl: 'Vui lòng nhập Url target',
}, },
crudActions: { crudActions: {
save: 'Lưu', save: 'Lưu',
...@@ -997,13 +1000,13 @@ export default { ...@@ -997,13 +1000,13 @@ export default {
}, },
confirmActionsTitle: { confirmActionsTitle: {
confirmDelete: 'Xác nhận', confirmDelete: 'Xác nhận',
confirmDeleteContent: 'Bạn có chắc muốn xoá Menu này không?', confirmDeleteContent: 'Bạn có chắc muốn xoá Cấu hình này không?',
confirmDeleteCancelBtnLabel: 'Huỷ', confirmDeleteCancelBtnLabel: 'Huỷ',
}, },
actionMessages: { actionMessages: {
addSuccess: 'Thêm Menu thành công', addSuccess: 'Thêm Cấu hình thành công',
updateSuccess: 'Cập nhập Menu thành công', updateSuccess: 'Cập nhập Cấu hình thành công',
deleteSuccess: 'Xóa Menu thành công', deleteSuccess: 'Xóa Cấu hình thành công',
}, },
}, },
......
<template> <template>
<div class="row q-col-gutter-sm flex-center q-mt-sm"> <div class="row q-col-gutter-sm flex-center q-mt-sm">
<div class="col-auto text-h6 text-weight-regular flex flex-center q-mr-md"> <div class="col-auto text-h6 text-weight-regular flex flex-center q-mr-md">
{{ $t('listPolicy.title') }} {{ $t('listConfigSystem.title') }}
<q-separator vertical spaced /> <q-separator vertical spaced />
</div> </div>
<q-space></q-space> <q-space></q-space>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
v-model="sreachNamePage" v-model="sreachNamePage"
dense dense
outlined outlined
:label="$t('listPolicy.titleColumnsTable.namePage')" :label="$t('listConfigSystem.titleColumnsTable.namePage')"
clearable clearable
></q-input> ></q-input>
</div> </div>
...@@ -38,8 +38,8 @@ ...@@ -38,8 +38,8 @@
<div class="col-12 q-mt-sm"> <div class="col-12 q-mt-sm">
<q-table <q-table
:rows="listPolicy" :rows="listConfigSystem"
:columns="tableColumnsPolicy" :columns="tableColumnsConfigSystem"
:no-data-label="$t('emptyData')" :no-data-label="$t('emptyData')"
row-key="name" row-key="name"
separator="cell" separator="cell"
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
@click="openUpdateDialog(rowData.row.id)" @click="openUpdateDialog(rowData.row.id)"
> >
<q-tooltip :offset="[10, 10]">{{ <q-tooltip :offset="[10, 10]">{{
$t('listPolicy.toolTipMessageUpdate') $t('listConfigSystem.toolTipMessageUpdate')
}}</q-tooltip> }}</q-tooltip>
</q-btn> </q-btn>
<q-btn <q-btn
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
@click="confirmDelete(rowData.row.id)" @click="confirmDelete(rowData.row.id)"
> >
<q-tooltip :offset="[10, 10]">{{ <q-tooltip :offset="[10, 10]">{{
$t('listPolicy.toolTipMessageDelete') $t('listConfigSystem.toolTipMessageDelete')
}}</q-tooltip> }}</q-tooltip>
</q-btn> </q-btn>
</q-td> </q-td>
...@@ -94,20 +94,35 @@ ...@@ -94,20 +94,35 @@
</td> </td>
</template> </template>
<template v-slot:body-cell-url="rowData">
<q-td>
<div align="center">
<a
:href="rowData.row.url"
target="_blank"
style="max-width: 10rem"
>{{ rowData.row.url }}</a
>
</div>
</q-td>
</template>
<template v-slot:body-cell-status="rowData"> <template v-slot:body-cell-status="rowData">
<q-td> <q-td>
<div align="center"> <div align="center">
<q-chip <q-chip
:color=" :color="
rowData.value === PolicyStatus.active ? 'positive' : 'orange' rowData.value === ConfigSystemStatus.active
? 'positive'
: 'orange'
" "
text-color="white" text-color="white"
size="sm" size="sm"
> >
{{ {{
rowData.value === PolicyStatus.active rowData.value === ConfigSystemStatus.active
? $t('listPolicy.statusLabel.active') ? $t('listConfigSystem.statusLabel.active')
: $t('listPolicy.statusLabel.inactive') : $t('listConfigSystem.statusLabel.inactive')
}} }}
</q-chip> </q-chip>
</div> </div>
...@@ -131,6 +146,7 @@ ...@@ -131,6 +146,7 @@
v-model:namePage="namePage" v-model:namePage="namePage"
v-model:title="title" v-model:title="title"
v-model:content="content" v-model:content="content"
v-model:url="url"
v-model:num-index="numIndex" v-model:num-index="numIndex"
v-model:status="status" v-model:status="status"
@addUpdateConfigSystem="addConfigSystem" @addUpdateConfigSystem="addConfigSystem"
...@@ -142,6 +158,7 @@ ...@@ -142,6 +158,7 @@
v-model:namePage="namePage" v-model:namePage="namePage"
v-model:title="title" v-model:title="title"
v-model:content="content" v-model:content="content"
v-model:url="url"
v-model:num-index="numIndex" v-model:num-index="numIndex"
v-model:status="status" v-model:status="status"
@addUpdateConfigSystem="updateConfigSystem" @addUpdateConfigSystem="updateConfigSystem"
...@@ -150,8 +167,8 @@ ...@@ -150,8 +167,8 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import AddUpdatePolicyDialog from 'components/policy/index.vue'; import AddUpdatePolicyDialog from 'components/configSystem/index.vue';
import { PolicyStatus } from 'src/assets/enums'; import { ConfigSystemStatus } from 'src/assets/enums';
import { i18n } from 'src/boot/i18n'; import { i18n } from 'src/boot/i18n';
import { defineComponent, onMounted, Ref, ref } from 'vue'; import { defineComponent, onMounted, Ref, ref } from 'vue';
import Pagination from 'components/pagination/index.vue'; import Pagination from 'components/pagination/index.vue';
...@@ -173,12 +190,12 @@ export default defineComponent({ ...@@ -173,12 +190,12 @@ export default defineComponent({
AddUpdatePolicyDialog, AddUpdatePolicyDialog,
}, },
setup() { setup() {
const tableColumnsPolicy = [ const tableColumnsConfigSystem = [
{ {
name: 'stt', name: 'stt',
field: 'stt', field: 'stt',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.stt'), label: i18n.global.t('listConfigSystem.titleColumnsTable.stt'),
headerStyle: 'text-align: center !important; width: 7%', headerStyle: 'text-align: center !important; width: 7%',
align: 'center', align: 'center',
sortable: false, sortable: false,
...@@ -187,26 +204,35 @@ export default defineComponent({ ...@@ -187,26 +204,35 @@ export default defineComponent({
name: 'namePage', name: 'namePage',
field: 'namePage', field: 'namePage',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.namePage'), label: i18n.global.t('listConfigSystem.titleColumnsTable.namePage'),
align: 'left', align: 'left',
headerStyle: 'text-align: center !important; width: 17%', headerStyle: 'text-align: center !important; width: 11%',
sortable: false, sortable: false,
}, },
{ {
name: 'title', name: 'title',
field: 'title', field: 'title',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.title'), label: i18n.global.t('listConfigSystem.titleColumnsTable.title'),
align: 'left', align: 'left',
headerStyle: 'text-align: center !important; width: 15%', headerStyle: 'text-align: center !important; width: 11%',
sortable: false,
},
{
name: 'url',
field: 'url',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.url'),
align: 'left',
headerStyle: 'text-align: center !important; width: 14%',
sortable: false, sortable: false,
}, },
{ {
name: 'content', name: 'content',
field: 'content', field: 'content',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.content'), label: i18n.global.t('listConfigSystem.titleColumnsTable.content'),
headerStyle: 'text-align: center !important; width: 30%', headerStyle: 'text-align: center !important; width: 25%',
align: 'left', align: 'left',
sortable: false, sortable: false,
}, },
...@@ -214,7 +240,7 @@ export default defineComponent({ ...@@ -214,7 +240,7 @@ export default defineComponent({
name: 'numIndex', name: 'numIndex',
field: 'numIndex', field: 'numIndex',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.numIndex'), label: i18n.global.t('listConfigSystem.titleColumnsTable.numIndex'),
headerStyle: 'text-align: center !important; width: 7%', headerStyle: 'text-align: center !important; width: 7%',
align: 'center', align: 'center',
sortable: false, sortable: false,
...@@ -223,7 +249,7 @@ export default defineComponent({ ...@@ -223,7 +249,7 @@ export default defineComponent({
name: 'status', name: 'status',
field: 'status', field: 'status',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.status'), label: i18n.global.t('listConfigSystem.titleColumnsTable.status'),
headerStyle: 'text-align: center !important; width: 12%', headerStyle: 'text-align: center !important; width: 12%',
align: 'center', align: 'center',
sortable: false, sortable: false,
...@@ -232,14 +258,14 @@ export default defineComponent({ ...@@ -232,14 +258,14 @@ export default defineComponent({
name: 'action', name: 'action',
field: 'action', field: 'action',
required: true, required: true,
label: i18n.global.t('listPolicy.titleColumnsTable.action'), label: i18n.global.t('listConfigSystem.titleColumnsTable.action'),
headerStyle: 'text-align: center !important; width: 12%', headerStyle: 'text-align: center !important; width: 12%',
align: 'center', align: 'center',
sortable: false, sortable: false,
}, },
]; ];
const listPolicy: Ref<unknown[]> = ref([]); const listConfigSystem: Ref<unknown[]> = ref([]);
const sreachNamePage: Ref<string> = ref(''); const sreachNamePage: Ref<string> = ref('');
const pageIndex = ref(1); const pageIndex = ref(1);
const pageSize = ref(20); const pageSize = ref(20);
...@@ -252,9 +278,10 @@ export default defineComponent({ ...@@ -252,9 +278,10 @@ export default defineComponent({
const showDialogUpdate = ref(false); const showDialogUpdate = ref(false);
const namePage: Ref<string> = ref(''); const namePage: Ref<string> = ref('');
const title: Ref<string> = ref(''); const title: Ref<string> = ref('');
const url: Ref<string> = ref('');
const numIndex: Ref<number | undefined> = ref(undefined); const numIndex: Ref<number | undefined> = ref(undefined);
const content: Ref<string> = ref(''); const content: Ref<string> = ref('');
const status: Ref<number> = ref(PolicyStatus.active); const status: Ref<number> = ref(ConfigSystemStatus.active);
const ConfigSystemId: Ref<number | undefined> = ref(undefined); const ConfigSystemId: Ref<number | undefined> = ref(undefined);
const getConfigSystem = async () => { const getConfigSystem = async () => {
...@@ -271,7 +298,7 @@ export default defineComponent({ ...@@ -271,7 +298,7 @@ export default defineComponent({
BaseResponseBody<PaginationResponse<ListConfigSystem>> BaseResponseBody<PaginationResponse<ListConfigSystem>>
>; >;
if (response.data.error.code === config.API_RES_CODE.OK.code) { if (response.data.error.code === config.API_RES_CODE.OK.code) {
listPolicy.value = response.data.data.data; listConfigSystem.value = response.data.data.data;
totalPage.value = response.data.data.totalPages; totalPage.value = response.data.data.totalPages;
} }
} catch (error) {} } catch (error) {}
...@@ -281,8 +308,9 @@ export default defineComponent({ ...@@ -281,8 +308,9 @@ export default defineComponent({
namePage.value = ''; namePage.value = '';
title.value = ''; title.value = '';
content.value = ''; content.value = '';
url.value = '';
numIndex.value = undefined; numIndex.value = undefined;
status.value = PolicyStatus.active; status.value = ConfigSystemStatus.active;
showDialogAdd.value = true; showDialogAdd.value = true;
}; };
...@@ -290,6 +318,7 @@ export default defineComponent({ ...@@ -290,6 +318,7 @@ export default defineComponent({
const data = { const data = {
namePage: namePage.value, namePage: namePage.value,
title: title.value, title: title.value,
url: url.value,
content: content.value, content: content.value,
numIndex: numIndex.value, numIndex: numIndex.value,
status: status.value, status: status.value,
...@@ -303,7 +332,7 @@ export default defineComponent({ ...@@ -303,7 +332,7 @@ export default defineComponent({
showDialogAdd.value = false; showDialogAdd.value = false;
Notify.create({ Notify.create({
type: 'positive', type: 'positive',
message: i18n.global.t('listPolicy.actionMessages.addSuccess'), message: i18n.global.t('listConfigSystem.actionMessages.addSuccess'),
actions: [{ icon: 'close', color: 'white' }], actions: [{ icon: 'close', color: 'white' }],
}); });
void getConfigSystem(); void getConfigSystem();
...@@ -328,6 +357,7 @@ export default defineComponent({ ...@@ -328,6 +357,7 @@ export default defineComponent({
ConfigSystemId.value = response.data.data.id; ConfigSystemId.value = response.data.data.id;
namePage.value = response.data.data.namePage; namePage.value = response.data.data.namePage;
title.value = response.data.data.title; title.value = response.data.data.title;
url.value = response.data.data.url;
content.value = response.data.data.content; content.value = response.data.data.content;
numIndex.value = response.data.data.numIndex; numIndex.value = response.data.data.numIndex;
status.value = response.data.data.status; status.value = response.data.data.status;
...@@ -344,6 +374,7 @@ export default defineComponent({ ...@@ -344,6 +374,7 @@ export default defineComponent({
id: ConfigSystemId.value, id: ConfigSystemId.value,
name: namePage.value, name: namePage.value,
title: title.value, title: title.value,
url: url.value,
content: content.value, content: content.value,
numIndex: numIndex.value, numIndex: numIndex.value,
status: status.value, status: status.value,
...@@ -352,7 +383,9 @@ export default defineComponent({ ...@@ -352,7 +383,9 @@ export default defineComponent({
if (response.data.error.code === config.API_RES_CODE.OK.code) { if (response.data.error.code === config.API_RES_CODE.OK.code) {
Notify.create({ Notify.create({
type: 'positive', type: 'positive',
message: i18n.global.t('listPolicy.actionMessages.updateSuccess'), message: i18n.global.t(
'listConfigSystem.actionMessages.updateSuccess'
),
}); });
void getConfigSystem(); void getConfigSystem();
showDialogUpdate.value = false; showDialogUpdate.value = false;
...@@ -362,12 +395,14 @@ export default defineComponent({ ...@@ -362,12 +395,14 @@ export default defineComponent({
const confirmDelete = (id: number) => { const confirmDelete = (id: number) => {
Dialog.create({ Dialog.create({
title: i18n.global.t('listPolicy.confirmActionsTitle.confirmDelete'), title: i18n.global.t(
'listConfigSystem.confirmActionsTitle.confirmDelete'
),
message: i18n.global.t( message: i18n.global.t(
'listPolicy.confirmActionsTitle.confirmDeleteContent' 'listConfigSystem.confirmActionsTitle.confirmDeleteContent'
), ),
cancel: i18n.global.t( cancel: i18n.global.t(
'listPolicy.confirmActionsTitle.confirmDeleteCancelBtnLabel' 'listConfigSystem.confirmActionsTitle.confirmDeleteCancelBtnLabel'
), ),
color: 'negative', color: 'negative',
}).onOk(() => { }).onOk(() => {
...@@ -388,7 +423,9 @@ export default defineComponent({ ...@@ -388,7 +423,9 @@ export default defineComponent({
if (deleteResult.data.error.code === config.API_RES_CODE.OK.code) { if (deleteResult.data.error.code === config.API_RES_CODE.OK.code) {
Notify.create({ Notify.create({
type: 'positive', type: 'positive',
message: i18n.global.t('listPolicy.actionMessages.deleteSuccess'), message: i18n.global.t(
'listConfigSystem.actionMessages.deleteSuccess'
),
}); });
void getConfigSystem(); void getConfigSystem();
} }
...@@ -401,17 +438,18 @@ export default defineComponent({ ...@@ -401,17 +438,18 @@ export default defineComponent({
return { return {
getConfigSystem, getConfigSystem,
sreachNamePage, sreachNamePage,
listPolicy, listConfigSystem,
tableColumnsPolicy, tableColumnsConfigSystem,
pageIndex, pageIndex,
pageSize, pageSize,
totalPage, totalPage,
changePageSize, changePageSize,
PolicyStatus, ConfigSystemStatus,
showDialogUpdate, showDialogUpdate,
namePage, namePage,
content, content,
status, status,
url,
title, title,
numIndex, numIndex,
ConfigSystemId, ConfigSystemId,
......
...@@ -19,7 +19,7 @@ export enum Pages { ...@@ -19,7 +19,7 @@ export enum Pages {
menu = 'menu', menu = 'menu',
listBooking = 'danh-sach-booking', listBooking = 'danh-sach-booking',
work = 'cong-viec', work = 'cong-viec',
policy = 'cau-hinh-chinh-sach', configSystem = 'cau-hinh-he-thong',
news = 'cau-hinh-tin-tuc', news = 'cau-hinh-tin-tuc',
hotProduct = 'cau-hinh-san-pham-noi-bat', hotProduct = 'cau-hinh-san-pham-noi-bat',
} }
...@@ -120,9 +120,9 @@ const routes: RouteRecordRaw[] = [ ...@@ -120,9 +120,9 @@ const routes: RouteRecordRaw[] = [
name: Pages.work, name: Pages.work,
}, },
{ {
path: 'cau-hinh-chinh-sach', path: 'cau-hinh-he-thong',
component: () => import('pages/cau-hinh-chinh-sach/index.vue'), component: () => import('pages/cau-hinh-he-thong/index.vue'),
name: Pages.policy, name: Pages.configSystem,
}, },
{ {
path: 'cau-hinh-tin-tuc', path: 'cau-hinh-tin-tuc',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment