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