update

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