update

parent 1a359cee
...@@ -154,14 +154,12 @@ export type ProvinceType = { ...@@ -154,14 +154,12 @@ export type ProvinceType = {
level: string; level: string;
}; };
export type Coordinates = { export type Coordinates = {
image: { image: {
src:string src: string;
} };
canvas: any canvas: any;
};
}
export type MusicType = { export type MusicType = {
id: number; id: number;
...@@ -370,6 +368,7 @@ export type CustomerLevelType = { ...@@ -370,6 +368,7 @@ export type CustomerLevelType = {
description: string; description: string;
level: string; level: string;
status: number; status: number;
levelId: number;
}; };
export type CustomerRank = { export type CustomerRank = {
...@@ -481,7 +480,7 @@ export type PostDetailType = { ...@@ -481,7 +480,7 @@ export type PostDetailType = {
createTime?: string; createTime?: string;
updateBy?: string; updateBy?: string;
updateTime?: string; updateTime?: string;
filePost:string filePost: string;
}; };
export type PostCategoryDetailType = { export type PostCategoryDetailType = {
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<q-item-section> <q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{ <q-item-label class="text-h6 text-weight-regular">{{
$t('customer.dialogLabel.title.addCustomer') $t('customer.dialogLabel.title.addCustomer')
}}</q-item-label> }} </q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-card-section> </q-card-section>
...@@ -121,8 +121,6 @@ ...@@ -121,8 +121,6 @@
:options="levelOptions" :options="levelOptions"
:rules="levelRules" :rules="levelRules"
map-options map-options
option-value="id"
option-label="name"
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
......
...@@ -39,7 +39,7 @@ export default defineComponent({ ...@@ -39,7 +39,7 @@ export default defineComponent({
const type: Ref<string | null> = ref(null); const type: Ref<string | null> = ref(null);
const representative: Ref<string | null> = ref(null); const representative: Ref<string | null> = ref(null);
const position: Ref<string | null> = ref(null); const position: Ref<string | null> = ref(null);
const level: Ref<CustomerLevelType | null> = ref(null); const level = ref(null);
const confirmEditCustomer = () => { const confirmEditCustomer = () => {
context.emit('editCustomer', { context.emit('editCustomer', {
...@@ -75,6 +75,9 @@ export default defineComponent({ ...@@ -75,6 +75,9 @@ export default defineComponent({
type.value = props.customerInfo.type; type.value = props.customerInfo.type;
representative.value = props.customerInfo.representative; representative.value = props.customerInfo.representative;
position.value = props.customerInfo.position; position.value = props.customerInfo.position;
// eslint-disable-next-line
// @ts-ignore
// eslint-disable-next-line
level.value = props.customerInfo.level; level.value = props.customerInfo.level;
}; };
// const userNameRules = [ // const userNameRules = [
...@@ -96,7 +99,6 @@ export default defineComponent({ ...@@ -96,7 +99,6 @@ export default defineComponent({
// i18n.global.t('customer.validateMessages.lengthCode'), // i18n.global.t('customer.validateMessages.lengthCode'),
// ]; // ];
const customerNameRules = [ const customerNameRules = [
(val?: string) => (val?: string) =>
(val && val.trim().length) || (val && val.trim().length) ||
...@@ -106,7 +108,6 @@ export default defineComponent({ ...@@ -106,7 +108,6 @@ export default defineComponent({
i18n.global.t('customer.validateMessages.lengthCustomerName'), i18n.global.t('customer.validateMessages.lengthCustomerName'),
]; ];
// const businessNameRules = [ // const businessNameRules = [
// (val?: string) => // (val?: string) =>
// (val && val.trim().length) || // (val && val.trim().length) ||
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<q-item-section> <q-item-section>
<q-item-label class="text-h6 text-weight-regular">{{ <q-item-label class="text-h6 text-weight-regular">{{
$t('customer.dialogLabel.title.editCustomer') $t('customer.dialogLabel.title.editCustomer')
}}</q-item-label> }} 122</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-card-section> </q-card-section>
...@@ -122,12 +122,12 @@ ...@@ -122,12 +122,12 @@
:options="levelOptions" :options="levelOptions"
:rules="levelRules" :rules="levelRules"
map-options map-options
option-value="id"
option-label="name"
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
clearable clearable
hide-bottom-space hide-bottom-space
></q-select> ></q-select>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<q-item-label <q-item-label
class="text-h6 text-weight-regular" class="text-h6 text-weight-regular"
style="text-align: center" style="text-align: center"
>{{ $t('listBooking.dialogLabel.title') }}</q-item-label >{{ $t('listBooking.dialogLabel.title') }} </q-item-label
> >
</q-item-section> </q-item-section>
</q-item> </q-item>
...@@ -133,11 +133,11 @@ ...@@ -133,11 +133,11 @@
</div> </div>
</div> </div>
<v-row> <!-- <v-row>
<v-col> <v-col>
<tableDeposit :id="detailInfoBooking.id"></tableDeposit> <tableDeposit :id="detailInfoBooking.id"></tableDeposit>
</v-col> </v-col>
</v-row> </v-row> -->
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right"> <q-card-actions align="right">
...@@ -157,10 +157,10 @@ ...@@ -157,10 +157,10 @@
<script lang="ts"> <script lang="ts">
import { defineComponent, PropType, watch } from 'vue'; import { defineComponent, PropType, watch } from 'vue';
import { ListBooking } from 'src/assets/type'; import { ListBooking } from 'src/assets/type';
import tableDeposit from '../../components/detailBooking/tableDeposit/index.vue'; // import tableDeposit from '../../components/detailBooking/tableDeposit/index.vue';
export default defineComponent({ export default defineComponent({
components: { components: {
tableDeposit, // tableDeposit,
}, },
props: { props: {
showDialog: { showDialog: {
......
...@@ -27,21 +27,11 @@ ...@@ -27,21 +27,11 @@
<q-select <q-select
v-model="levelSelected" v-model="levelSelected"
:options="levelOptions" :options="levelOptions"
option-label="level"
option-value="level"
dense dense
outlined outlined
label="Đánh giá sao" label="Đánh giá sao"
clearable clearable
> >
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section>
<q-item-label>{{ scope.opt.level }}</q-item-label>
<!-- <q-item-label caption>{{ scope.opt.description }}</q-item-label> -->
</q-item-section>
</q-item>
</template>
</q-select> </q-select>
</div> </div>
<div class="col-auto"> <div class="col-auto">
...@@ -389,7 +379,17 @@ export default defineComponent({ ...@@ -389,7 +379,17 @@ export default defineComponent({
const position: Ref<string | null> = ref(null); const position: Ref<string | null> = ref(null);
const level: Ref<CustomerLevelType | null> = ref(null); const level: Ref<CustomerLevelType | null> = ref(null);
const levelOptions: Ref<CustomerLevelType[] | null> = ref([]); const levelOptions = ref([
'1',
'1.5',
'2',
'2.5',
'3',
'3.5',
'4',
'4.5',
'5',
]);
const getListCustomers = async () => { const getListCustomers = async () => {
try { try {
const response = (await api({ const response = (await api({
...@@ -411,16 +411,16 @@ export default defineComponent({ ...@@ -411,16 +411,16 @@ export default defineComponent({
} }
} catch (error) {} } catch (error) {}
}; };
const getCustomerLevelOptions = async () => { // const getCustomerLevelOptions = async () => {
const response = (await api({ // const response = (await api({
url: API_PATHS.listCustomerLevel, // url: API_PATHS.listCustomerLevel,
method: 'GET', // method: 'GET',
params: {}, // params: {},
})) as AxiosResponse<BaseResponseBody<CustomerLevelType[]>>; // })) as AxiosResponse<BaseResponseBody<CustomerLevelType[]>>;
if (response.data.error.code === config.API_RES_CODE.OK.code) { // if (response.data.error.code === config.API_RES_CODE.OK.code) {
levelOptions.value = response.data.data; // levelOptions.value = response.data.data;
} // }
}; // };
const confirmDeleteCustomer = (id: number) => { const confirmDeleteCustomer = (id: number) => {
Dialog.create({ Dialog.create({
title: i18n.global.t( title: i18n.global.t(
...@@ -654,7 +654,7 @@ export default defineComponent({ ...@@ -654,7 +654,7 @@ export default defineComponent({
onMounted(() => { onMounted(() => {
void getListCustomers(); void getListCustomers();
void getCustomerLevelOptions(); // void getCustomerLevelOptions();
}); });
return { return {
openUpdateCustomerDialog, openUpdateCustomerDialog,
...@@ -692,7 +692,7 @@ export default defineComponent({ ...@@ -692,7 +692,7 @@ export default defineComponent({
totalPage, totalPage,
listRating, listRating,
changePageSize, changePageSize,
getCustomerLevelOptions, // getCustomerLevelOptions,
confirmDeleteCustomer, confirmDeleteCustomer,
confirmBrowserCustomer, confirmBrowserCustomer,
customerInfo, customerInfo,
......
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