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

update

parent 46512ec8
import { defineComponent, Ref, ref, watch } from 'vue'; import { defineComponent, Ref, ref, watch } from 'vue';
import { i18n } from 'src/boot/i18n'; import { i18n } from 'src/boot/i18n';
import { Notify } from 'quasar';
import UploadImage from '../../upload-image/index.vue'; import UploadImage from '../../upload-image/index.vue';
export default defineComponent({ export default defineComponent({
...@@ -55,6 +56,12 @@ export default defineComponent({ ...@@ -55,6 +56,12 @@ export default defineComponent({
embeddedUrl: embeddedUrl.value, embeddedUrl: embeddedUrl.value,
imageUrl: urlFileLocal.value, imageUrl: urlFileLocal.value,
}); });
Notify.create({
type: 'positive',
message: i18n.global.t(
'artist.dialogLabel.validateMessages.addHotProductSccess'
),
});
}; };
const product_name = [ const product_name = [
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:model-value="openAddHotProduct" :model-value="openAddHotProduct"
@update:model-value="$emit('update:openAddHotProduct', $event)" @update:model-value="$emit('update:openAddHotProduct', $event)"
> >
<q-card style="min-width: 600px" bordered> <q-card style="min-width: 38rem" bordered>
<q-form greedy @submit="SubmitData"> <q-form greedy @submit="SubmitData">
<q-card-section> <q-card-section>
<q-item> <q-item>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:model-value="openUpdateHotProduct" :model-value="openUpdateHotProduct"
@update:model-value="$emit('update:openUpadateHotProduct', $event)" @update:model-value="$emit('update:openUpadateHotProduct', $event)"
> >
<q-card style="min-width: 600px" bordered> <q-card style="min-width: 38rem" bordered>
<q-form greedy @submit="SubbmitDataUpdate"> <q-form greedy @submit="SubbmitDataUpdate">
<q-card-section> <q-card-section>
<q-item> <q-item>
......
import { defineComponent, PropType, Ref, ref, watch } from 'vue'; import { defineComponent, PropType, Ref, ref, watch } from 'vue';
import { i18n } from 'src/boot/i18n'; import { i18n } from 'src/boot/i18n';
// import { isEmail } from '../../../boot/functions';
// import { isMobilePhone } from '../../../boot/functions';
import UploadImage from '../../upload-image/index.vue'; import UploadImage from '../../upload-image/index.vue';
import { ProductType } from 'src/assets/type'; import { ProductType } from 'src/assets/type';
import { config } from 'src/assets/configurations'; import { config } from 'src/assets/configurations';
import { Notify } from 'quasar';
export default defineComponent({ export default defineComponent({
components: { components: {
UploadImage, UploadImage,
...@@ -77,6 +76,12 @@ export default defineComponent({ ...@@ -77,6 +76,12 @@ export default defineComponent({
imageUrl: urlFileLocal.value, imageUrl: urlFileLocal.value,
id: id.value, id: id.value,
}); });
Notify.create({
type: 'positive',
message: i18n.global.t(
'artist.dialogLabel.validateMessages.updateHotProductSccess'
),
});
}; };
const product_name = [ const product_name = [
(val?: string) => (val?: string) =>
......
...@@ -127,7 +127,6 @@ export default defineComponent({ ...@@ -127,7 +127,6 @@ export default defineComponent({
const isDefault: Ref<number> = ref(2); const isDefault: Ref<number> = ref(2);
return { return {
defaultStatus,
accountOwnerRules, accountOwnerRules,
accountNumberRules, accountNumberRules,
cardNumberRules, cardNumberRules,
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
:model-value="isOpenAddAccountBankDialog" :model-value="isOpenAddAccountBankDialog"
@update:model-value="$emit('update:isOpenAddAccountBankDialog', $event)" @update:model-value="$emit('update:isOpenAddAccountBankDialog', $event)"
> >
<q-card style="min-width: 500px" bordered> <q-card style="min-width: 60rem" bordered>
<q-form greedy @submit.prevent="confirmAddAccBank"> <q-form greedy @submit.prevent="confirmAddAccBank">
<q-card-section> <q-card-section>
<q-item style="padding-top: 0; padding-bottom: 0"> <q-item style="padding-top: 0; padding-bottom: 0">
<q-item-section> <q-item-section>
<q-item-label <q-item-label
><div class="text-h6 text-weight-regular" align="center"> ><div class="text-h6 text-weight-regular">
{{ $t('artist.dialogLabel.title.addAccountBank') }} {{ $t('artist.dialogLabel.title.addAccountBank') }}
</div></q-item-label </div></q-item-label
> >
...@@ -21,12 +21,11 @@ ...@@ -21,12 +21,11 @@
<q-card-section> <q-card-section>
<div class="row q-col-gutter-sm"> <div class="row q-col-gutter-sm">
<div class="col-12"> <div class="col-6">
<q-input <q-input
v-model="accountOwner" v-model="accountOwner"
:label="$t('artist.dialogLabel.fieldLabels.accountOwner')" :label="$t('artist.dialogLabel.fieldLabels.accountOwner')"
:rules="accountOwnerRules" :rules="accountOwnerRules"
hide-bottom-space
class="q-my-sm" class="q-my-sm"
outlined outlined
></q-input> ></q-input>
...@@ -34,7 +33,6 @@ ...@@ -34,7 +33,6 @@
v-model="accountNumber" v-model="accountNumber"
:label="$t('artist.dialogLabel.fieldLabels.accountNumber')" :label="$t('artist.dialogLabel.fieldLabels.accountNumber')"
:rules="accountNumberRules" :rules="accountNumberRules"
hide-bottom-space
mask="###############" mask="###############"
class="q-my-sm" class="q-my-sm"
outlined outlined
...@@ -44,12 +42,12 @@ ...@@ -44,12 +42,12 @@
@update:model-value="$emit('update:cardNumber', $event)" @update:model-value="$emit('update:cardNumber', $event)"
:label="$t('artist.dialogLabel.fieldLabels.cardNumber')" :label="$t('artist.dialogLabel.fieldLabels.cardNumber')"
:rules="cardNumberRules" :rules="cardNumberRules"
hide-bottom-space
mask="################" mask="################"
class="q-my-sm" class="q-my-sm"
outlined outlined
></q-input> ></q-input>
</div>
<div class="col-6">
<q-select <q-select
v-model="bank" v-model="bank"
:options="cardBankOptions" :options="cardBankOptions"
...@@ -62,7 +60,6 @@ ...@@ -62,7 +60,6 @@
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
hide-bottom-space
clearable clearable
></q-select> ></q-select>
<q-select <q-select
...@@ -77,11 +74,10 @@ ...@@ -77,11 +74,10 @@
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
hide-bottom-space
clearable clearable
></q-select> ></q-select>
<div class="flex"> <div class="flex q-pt-sm">
<div class="flex flex-center text-body1 q-ml-xs">Mặc định</div> <div class="flex flex-center text-body1 q-ml-xs">Mặc định</div>
<q-checkbox <q-checkbox
v-model="isDefault" v-model="isDefault"
...@@ -95,18 +91,18 @@ ...@@ -95,18 +91,18 @@
</q-card-section> </q-card-section>
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn <q-btn
type="submit" color="grey"
color="primary"
style="width: 90px" style="width: 90px"
no-caps no-caps
:label="$t('userPage.crudActions.save')" :label="$t('userPage.crudActions.cancel')"
@click="$emit('click:CloseBtn')"
/> />
<q-btn <q-btn
color="grey" type="submit"
color="primary"
style="width: 90px" style="width: 90px"
no-caps no-caps
:label="$t('userPage.crudActions.cancel')" :label="$t('userPage.crudActions.save')"
@click="$emit('click:CloseBtn')"
/> />
</q-card-actions> </q-card-actions>
</q-form> </q-form>
......
...@@ -130,7 +130,6 @@ export default defineComponent({ ...@@ -130,7 +130,6 @@ export default defineComponent({
const isDefault: Ref<number> = ref(2); const isDefault: Ref<number> = ref(2);
return { return {
defaultStatus,
accountOwnerRules, accountOwnerRules,
bankNameRules, bankNameRules,
cardTypeRules, cardTypeRules,
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
:model-value="isOpenEditAccountBankDialog" :model-value="isOpenEditAccountBankDialog"
@update:model-value="$emit('update:isOpenEditAccountBankDialog', $event)" @update:model-value="$emit('update:isOpenEditAccountBankDialog', $event)"
> >
<q-card style="min-width: 500px" bordered> <q-card style="min-width: 60rem" bordered>
<q-form greedy @submit.prevent="confirmEditAccBank"> <q-form greedy @submit.prevent="confirmEditAccBank">
<q-card-section> <q-card-section>
<q-item style="padding-top: 0; padding-bottom: 0"> <q-item style="padding-top: 0; padding-bottom: 0">
<q-item-section> <q-item-section>
<q-item-label <q-item-label
><div class="text-h6 text-weight-regular" align="center"> ><div class="text-h6 text-weight-regular">
{{ $t('artist.dialogLabel.title.editAccountBank') }} {{ $t('artist.dialogLabel.title.editAccountBank') }}
</div></q-item-label </div></q-item-label
> >
...@@ -21,12 +21,11 @@ ...@@ -21,12 +21,11 @@
<q-card-section> <q-card-section>
<div class="row q-col-gutter-sm"> <div class="row q-col-gutter-sm">
<div class="col-12"> <div class="col-6">
<q-input <q-input
v-model="accountOwner" v-model="accountOwner"
:label="$t('artist.dialogLabel.fieldLabels.accountOwner')" :label="$t('artist.dialogLabel.fieldLabels.accountOwner')"
:rules="accountOwnerRules" :rules="accountOwnerRules"
hide-bottom-space
class="q-my-sm" class="q-my-sm"
outlined outlined
></q-input> ></q-input>
...@@ -34,7 +33,6 @@ ...@@ -34,7 +33,6 @@
v-model="accountNumber" v-model="accountNumber"
:label="$t('artist.dialogLabel.fieldLabels.accountNumber')" :label="$t('artist.dialogLabel.fieldLabels.accountNumber')"
:rules="accountNumberRules" :rules="accountNumberRules"
hide-bottom-space
type="number" type="number"
class="q-my-sm" class="q-my-sm"
outlined outlined
...@@ -43,12 +41,12 @@ ...@@ -43,12 +41,12 @@
v-model="cardNumber" v-model="cardNumber"
:label="$t('artist.dialogLabel.fieldLabels.cardNumber')" :label="$t('artist.dialogLabel.fieldLabels.cardNumber')"
:rules="cardNumberRules" :rules="cardNumberRules"
hide-bottom-space
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
></q-input> ></q-input>
</div>
<div class="col-6">
<q-select <q-select
v-model="bank" v-model="bank"
:options="cardBankOptions" :options="cardBankOptions"
...@@ -61,7 +59,6 @@ ...@@ -61,7 +59,6 @@
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
hide-bottom-space
clearable clearable
></q-select> ></q-select>
<q-select <q-select
...@@ -77,11 +74,9 @@ ...@@ -77,11 +74,9 @@
type="text" type="text"
class="q-my-sm" class="q-my-sm"
outlined outlined
hide-bottom-space
clearable clearable
></q-select> ></q-select>
<div class="flex q-pt-sm">
<div class="flex">
<div class="flex flex-center text-body1 q-ml-xs">Mặc định</div> <div class="flex flex-center text-body1 q-ml-xs">Mặc định</div>
<q-checkbox <q-checkbox
v-model="isDefault" v-model="isDefault"
...@@ -95,18 +90,18 @@ ...@@ -95,18 +90,18 @@
</q-card-section> </q-card-section>
<q-card-actions align="right"> <q-card-actions align="right">
<q-btn <q-btn
type="submit" color="grey"
color="primary"
style="width: 90px" style="width: 90px"
no-caps no-caps
:label="$t('userPage.crudActions.save')" :label="$t('userPage.crudActions.cancel')"
@click="$emit('click:CloseBtn')"
/> />
<q-btn <q-btn
color="grey" type="submit"
color="primary"
style="width: 90px" style="width: 90px"
no-caps no-caps
:label="$t('userPage.crudActions.cancel')" :label="$t('userPage.crudActions.save')"
@click="$emit('click:CloseBtn')"
/> />
</q-card-actions> </q-card-actions>
</q-form> </q-form>
......
...@@ -89,7 +89,6 @@ export default defineComponent({ ...@@ -89,7 +89,6 @@ export default defineComponent({
name: item.row.name, name: item.row.name,
status: item.row.status, status: item.row.status,
}); });
context.emit('click:openUpadateHotProduct'); context.emit('click:openUpadateHotProduct');
}; };
const clickAdd = () => { const clickAdd = () => {
......
...@@ -444,6 +444,9 @@ export default { ...@@ -444,6 +444,9 @@ export default {
editAccess: 'Cập nhập thông tin tài khoản ngân hàng thành công', editAccess: 'Cập nhập thông tin tài khoản ngân hàng thành công',
deleteAccess: 'Xoá tài khoản ngân hàng thành công', deleteAccess: 'Xoá tài khoản ngân hàng thành công',
deleteStoryAccess: 'Xoá Story thành công', deleteStoryAccess: 'Xoá Story thành công',
addHotProductSccess: 'Thêm sản phẩm thành công',
updateHotProductSccess: 'Cập nhập sản phẩm thành công',
deleteHotProductSccess: 'Xóa sản phẩm thành công',
}, },
}, },
confirmActionsTitle: { confirmActionsTitle: {
...@@ -559,6 +562,12 @@ export default { ...@@ -559,6 +562,12 @@ export default {
active: 'Sản phẩm nổi bật', active: 'Sản phẩm nổi bật',
inactive: 'Sản phẩm khác', inactive: 'Sản phẩm khác',
}, },
confirmActionsTitle: {
confirmDeleteHotProdcutTitle: 'Xác nhận',
confirmDeleteHotProdcutContent:
'Bạn có chắc muốn xoá sản phẩm này không?',
confirmDeleteHotProdcutBtnLabel: 'Huỷ',
},
}, },
vabAccount: { vabAccount: {
confirmActionsTitle: { confirmActionsTitle: {
......
...@@ -524,16 +524,22 @@ export default defineComponent({ ...@@ -524,16 +524,22 @@ export default defineComponent({
const confirmDeleteRow = (value: number) => { const confirmDeleteRow = (value: number) => {
Dialog.create({ Dialog.create({
title: i18n.global.t( title: i18n.global.t(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle' 'artist.hotProduct.confirmActionsTitle.confirmDeleteHotProdcutTitle'
), ),
message: i18n.global.t( message: i18n.global.t(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankContent' 'artist.hotProduct.confirmActionsTitle.confirmDeleteHotProdcutContent'
), ),
cancel: i18n.global.t( cancel: i18n.global.t(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel' 'artist.hotProduct.confirmActionsTitle.confirmDeleteHotProdcutBtnLabel'
), ),
color: 'negative', color: 'negative',
}).onOk(() => { }).onOk(() => {
Notify.create({
type: 'positive',
message: i18n.global.t(
'artist.dialogLabel.validateMessages.deleteAccess'
),
});
products.value.splice(value, 1); products.value.splice(value, 1);
}); });
}; };
......
...@@ -457,16 +457,22 @@ export default defineComponent({ ...@@ -457,16 +457,22 @@ export default defineComponent({
const confirmDeleteRow = (value: number) => { const confirmDeleteRow = (value: number) => {
Dialog.create({ Dialog.create({
title: i18n.global.t( title: i18n.global.t(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankTitle' 'artist.hotProduct.confirmActionsTitle.confirmDeleteHotProdcutTitle'
), ),
message: i18n.global.t( message: i18n.global.t(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankContent' 'artist.hotProduct.confirmActionsTitle.confirmDeleteHotProdcutContent'
), ),
cancel: i18n.global.t( cancel: i18n.global.t(
'artist.bankAccount.confirmActionsTitle.confirmDeleteAccBankBtnLabel' 'artist.hotProduct.confirmActionsTitle.confirmDeleteHotProdcutBtnLabel'
), ),
color: 'negative', color: 'negative',
}).onOk(() => { }).onOk(() => {
Notify.create({
type: 'positive',
message: i18n.global.t(
'artist.dialogLabel.validateMessages.deleteAccess'
),
});
products.value.splice(value, 1); products.value.splice(value, 1);
}); });
}; };
......
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