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

update

parent 38f4dc40
......@@ -473,6 +473,7 @@ export type ListConfigSystem = {
id: number;
namePage: string;
content: string;
numIndex: number;
url: string;
createTime?: string;
createBy?: string;
......@@ -484,6 +485,7 @@ export type DetailConfigSystem = {
id: number;
namePage: string;
content: string;
numIndex: number;
url: string;
createTime?: string;
createBy?: string;
......@@ -496,6 +498,7 @@ export type UpdateConfigSystem = {
namePage: string;
content: string;
url: string;
numIndex: number;
createTime?: string;
createBy?: string;
updateTime?: string;
......@@ -506,10 +509,5 @@ export type AddConfigSystem = {
namePage: string;
content: string;
url: string;
};
export type EmbelType = {
id: number;
linkEmbed: string;
status: number;
numIndex: number;
};
......@@ -34,6 +34,7 @@ export default defineComponent({
professionOptions: { type: Array, required: true },
artistLevelOptions: { type: Array, required: true },
workOptions: { type: Array, required: true },
favoriteScore: { type: Number, required: true },
artistCodeRules: { type: Boolean, required: true },
fullNameRules: { type: Boolean, required: true },
artistNameRules: { type: Boolean, required: true },
......@@ -173,6 +174,7 @@ export default defineComponent({
'update:nationality',
'update:fields',
'update:works',
'update:favoriteScore',
'update:qualification',
'update:artistLevel',
'update:hidden_img',
......
......@@ -308,6 +308,23 @@
></q-select>
</div>
</div>
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.favoriteScore') }}
<span style="color: red">*</span>
</div>
<div class="col-8">
<q-input
:model-value="favoriteScore"
@update:model-value="$emit('update:favoriteScore', $event)"
mask="#############"
class="q-my-sm"
outlined
dense
hide-bottom-space
></q-input>
</div>
</div>
</div>
<div class="col-5 q-ml-xl">
<div class="row flex-center">
......@@ -428,17 +445,7 @@
></q-input>
</div>
</div>
<!-- check_infoBooking -->
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.infoBooking') }}
</div>
<div class="col-8">
<q-checkbox v-model="check_infoBooking" class="q-my-sm"></q-checkbox>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.userAdminister') }}
<span style="color: red">*</span>
......@@ -447,7 +454,7 @@
<q-input class="q-my-sm" outlined dense hide-bottom-space></q-input>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{
$t('artist.artistInformation.titleDataField.phoneNumberAdminister')
......@@ -468,7 +475,7 @@
></q-input>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.emailAdminister') }}
<span style="color: red">*</span>
......@@ -486,9 +493,45 @@
></q-input>
</div>
</div>
<!-- check_infoBooking -->
<div class="row flex-center">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.infoBooking') }}
</div>
<div class="col-8">
<q-checkbox v-model="check_infoBooking" class="q-my-sm"></q-checkbox>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.facebookMessage') }}
{{ $t('artist.artistInformation.titleDataField.phoneNumberBooking') }}
<span style="color: red">*</span>
</div>
<div class="col-8">
<q-input
mask="##########"
class="q-my-sm"
outlined
dense
hide-bottom-space
></q-input>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.emailBooking') }}
<span style="color: red">*</span>
</div>
<div class="col-8">
<q-input outlined class="q-my-sm" dense hide-bottom-space></q-input>
</div>
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{
$t('artist.artistInformation.titleDataField.facebookMessageBooking')
}}
</div>
<div class="col-8">
<q-input outlined class="q-my-sm" dense></q-input>
......@@ -496,7 +539,7 @@
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.instagram') }}
{{ $t('artist.artistInformation.titleDataField.instagramBooking') }}
</div>
<div class="col-8">
<q-input outlined class="q-my-sm" dense></q-input>
......@@ -504,7 +547,7 @@
</div>
<div class="row flex-center" v-if="check_infoBooking">
<div class="col-3 text-weight-medium">
{{ $t('artist.artistInformation.titleDataField.whatsapp') }}
{{ $t('artist.artistInformation.titleDataField.whatsappBooking') }}
</div>
<div class="col-8">
<q-input outlined class="q-my-sm" dense></q-input>
......
......@@ -41,8 +41,33 @@
:rules="namePageRules"
clearable
></q-input>
<q-input
:model-value="numIndex"
@update:model-value="$emit('update:numIndex', $event)"
:label="$t('listConfigSystem.dialogLabel.fieldLabels.numIndex')"
class="q-my-sm"
type="text"
outlined
clearable
></q-input>
</div>
<div class="col-6">
<q-select
:model-value="nameMenu"
@update:model-value="$emit('update:nameMenu', $event)"
:label="$t('listConfigSystem.dialogLabel.fieldLabels.nameMenu')"
:rules="nameMenuRules"
:options="nameMenuOptions"
multiple
map-options
class="q-my-sm"
option-value="id"
option-label="name"
type="text"
outlined
use-chips
clearable
></q-select>
<q-input
:model-value="url"
@update:model-value="$emit('update:url', $event)"
......@@ -61,7 +86,7 @@
@update:model-value="$emit('update:content', $event)"
ref="editorRef"
placeholder="Nội dung *"
style="min-height: 32rem"
style="min-height: 28rem"
toolbar-text-color="white"
toolbar-toggle-color="yellow-8"
toolbar-bg="primary"
......@@ -195,7 +220,10 @@ export default defineComponent({
isUpdate: { type: Boolean, default: false },
namePage: { type: String, required: true },
url: { type: String, required: true },
numIndex: { type: String, required: true },
content: { type: String, required: true },
nameMenu: { type: Number, required: true },
nameMenuOptions: { type: Array, required: true },
},
setup() {
const namePageRules = [
......@@ -208,9 +236,15 @@ export default defineComponent({
(val && val.trim().length) ||
i18n.global.t('listConfigSystem.validateMessages.requireUrl'),
];
const nameMenuRules = [
(val?: number) =>
val !== undefined ||
i18n.global.t('listConfigSystem.validateMessages.requireNameMenu'),
];
return {
namePageRules,
urlRules,
nameMenuRules,
ConfigSystemStatus,
};
},
......@@ -218,6 +252,8 @@ export default defineComponent({
'update:isOpened',
'update:namePage',
'update:content',
'update:numIndex',
'update:nameMenu',
'update:url',
'click:CloseBtn',
'addUpdateConfigSystem',
......
......@@ -408,6 +408,7 @@ export default {
work: 'Công việc',
qualification: 'Độ chuyên',
artistLevel: 'Xếp hạng',
favoriteScore: 'Số lượt thích',
action: 'Chức năng',
},
dialogLabel: {
......@@ -484,6 +485,7 @@ export default {
work: 'Công việc',
qualification: 'Độ chuyên',
artistLevel: 'Xếp hạng',
favoriteScore: 'Số lượt thích',
phoneNumber: 'Số điện thoại',
email: 'Email',
facebook: 'FB Page',
......@@ -494,6 +496,11 @@ export default {
infoBooking: 'Quản lý Booking',
phoneNumberAdminister: 'Số điện thoại quản lý',
emailAdminister: 'Email quản lý',
phoneNumberBooking: 'Liên hệ số điện thoại booking',
emailBooking: 'Liên hệ Email booking',
facebookMessageBooking: 'Truy cập facebook booking',
instagramBooking: 'Truy cập instagram booking',
whatsappBooking: 'Truy cập whatsapp booking',
},
validateMessages: {
requireEmailAdminister: 'Vui lòng nhập Email người quản lý',
......@@ -973,11 +980,10 @@ export default {
titleColumnsTable: {
stt: 'STT',
namePage: 'Tên cấu hình',
title: 'Tiêu đề',
url: 'Url target',
nameMenu: 'Tên menu',
url: 'Path',
content: 'Nội dung',
numIndex: 'Vị trí',
status: 'Trạng thái',
action: 'Chức năng',
},
dialogLabel: {
......@@ -985,16 +991,16 @@ export default {
titleUpdate: 'Cập nhập Cấu hình',
fieldLabels: {
namePage: 'Tên cấu hình *',
title: 'Tiêu đề *',
url: 'Url target *',
nameMenu: 'Tên menu *',
url: 'Path *',
numIndex: 'Vị trí',
status: 'Trạng thái',
},
},
validateMessages: {
requireNamePage: 'Vui lòng nhập Tên Cấu hình',
requireTitle: 'Vui lòng nhập Tiêu đề',
requireUrl: 'Vui lòng nhập Url target',
requireNameMenu: 'Vui lòng nhập Tên Cấu hình',
requireUrl: 'Vui lòng nhập Path',
},
crudActions: {
save: 'Lưu',
......
......@@ -87,7 +87,7 @@
<td>
<div class="ellipsis-3-lines">
<div v-html="!item.row.content ? '' : item.row.content"></div>
<q-tooltip :offset="[10, 10]" max-width="30%"
<q-tooltip :offset="[10, 10]" max-width="26%"
><div v-html="!item.row.content ? '' : item.row.content"></div
></q-tooltip>
</div>
......@@ -123,7 +123,10 @@
v-model:isOpened="showDialogAdd"
v-model:namePage="namePage"
v-model:content="content"
v-model:numIndex="numIndex"
v-model:url="url"
v-model:name-menu="nameMenu"
:nameMenuOptions="nameMenuOptions"
@addUpdateConfigSystem="addConfigSystem"
/>
......@@ -132,7 +135,10 @@
v-model:isOpened="showDialogUpdate"
v-model:namePage="namePage"
v-model:content="content"
v-model:numIndex="numIndex"
v-model:url="url"
v-model:name-menu="nameMenu"
:nameMenuOptions="nameMenuOptions"
@addUpdateConfigSystem="updateConfigSystem"
/>
</div>
......@@ -177,7 +183,16 @@ export default defineComponent({
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.namePage'),
align: 'left',
headerStyle: 'text-align: center !important; width: 11%',
headerStyle: 'text-align: center !important; width: 12%',
sortable: false,
},
{
name: 'nameMenu',
field: 'nameMenu',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.nameMenu'),
align: 'left',
headerStyle: 'text-align: center !important; width: 12%',
sortable: false,
},
{
......@@ -186,7 +201,16 @@ export default defineComponent({
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.url'),
align: 'left',
headerStyle: 'text-align: center !important; width: 14%',
headerStyle: 'text-align: center !important; width: 19%',
sortable: false,
},
{
name: 'numIndex',
field: 'numIndex',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.numIndex'),
align: 'left',
headerStyle: 'text-align: center !important; width: 10%',
sortable: false,
},
{
......@@ -194,7 +218,7 @@ export default defineComponent({
field: 'content',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.content'),
headerStyle: 'text-align: center !important; width: 25%',
headerStyle: 'text-align: center !important; width: 32%',
align: 'left',
sortable: false,
},
......@@ -203,7 +227,7 @@ export default defineComponent({
field: 'action',
required: true,
label: i18n.global.t('listConfigSystem.titleColumnsTable.action'),
headerStyle: 'text-align: center !important; width: 12%',
headerStyle: 'text-align: center !important; width: 15%',
align: 'center',
sortable: false,
},
......@@ -221,8 +245,11 @@ export default defineComponent({
const showDialogAdd = ref(false);
const showDialogUpdate = ref(false);
const namePage: Ref<string> = ref('');
const nameMenuOptions: Ref<unknown[]> = ref([]);
const nameMenu: Ref<unknown | undefined> = ref();
const url: Ref<string> = ref('');
const content: Ref<string> = ref('');
const numIndex: Ref<number | undefined> = ref(undefined);
const ConfigSystemId: Ref<number | undefined> = ref(undefined);
const getConfigSystem = async () => {
......@@ -249,6 +276,8 @@ export default defineComponent({
namePage.value = '';
content.value = '';
url.value = '';
numIndex.value = undefined;
nameMenu.value = undefined;
showDialogAdd.value = true;
};
......@@ -256,7 +285,9 @@ export default defineComponent({
const data = {
namePage: namePage.value,
url: url.value,
numIndex: numIndex.value,
content: content.value,
// nameMenu: { id: nameMenu.value?.id },
};
const response = (await api({
url: API_PATHS.addConfigSystem,
......@@ -292,6 +323,8 @@ export default defineComponent({
ConfigSystemId.value = response.data.data.id;
namePage.value = response.data.data.namePage;
url.value = response.data.data.url;
numIndex.value = response.data.data.numIndex;
// nameMenu.value = response.data.data.nameMenu;
content.value = response.data.data.content;
}
} catch (error) {}
......@@ -306,7 +339,9 @@ export default defineComponent({
id: ConfigSystemId.value,
namePage: namePage.value,
url: url.value,
numIndex: numIndex.value,
content: content.value,
// nameMenu: { id: nameMenu.value?.id },
},
})) as AxiosResponse<BaseResponseBody<UpdateConfigSystem>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) {
......@@ -377,6 +412,9 @@ export default defineComponent({
namePage,
content,
url,
numIndex,
nameMenu,
nameMenuOptions,
ConfigSystemId,
showDialogAdd,
openAddDialog,
......
......@@ -327,15 +327,15 @@ export default defineComponent({
align: 'left',
sortable: false,
},
{
name: 'favoriteScore',
field: 'favoriteScore',
required: true,
label: i18n.global.t('listBooking.titleColumnsTable.favoriteScore'),
headerStyle: 'text-align: center !important; width: 7%',
align: 'center',
sortable: false,
},
// {
// name: 'favoriteScore',
// field: 'favoriteScore',
// required: true,
// label: i18n.global.t('listBooking.titleColumnsTable.favoriteScore'),
// headerStyle: 'text-align: center !important; width: 7%',
// align: 'center',
// sortable: false,
// },
{
name: 'status',
field: 'status',
......
......@@ -276,6 +276,15 @@ export default defineComponent({
align: 'left',
sortable: false,
},
{
name: 'favoriteScore',
field: 'favoriteScore',
required: true,
label: i18n.global.t('artist.tableColumnsArtist.favoriteScore'),
headerStyle: 'text-align: center !important;',
align: 'center',
sortable: false,
},
{
name: 'action',
field: 'action',
......
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