refactor: move value to constant
This commit is contained in:
parent
0fd01f6a34
commit
9aee87776f
2 changed files with 32 additions and 19 deletions
|
|
@ -60,6 +60,7 @@ import {
|
||||||
formMenuIconEmployee,
|
formMenuIconEmployee,
|
||||||
uploadFileListEmployee,
|
uploadFileListEmployee,
|
||||||
columnsAttachment,
|
columnsAttachment,
|
||||||
|
dialogCreateCustomerItem,
|
||||||
} from './constant';
|
} from './constant';
|
||||||
import { useCustomerForm, useEmployeeForm } from './form';
|
import { useCustomerForm, useEmployeeForm } from './form';
|
||||||
import { storeToRefs } from 'pinia';
|
import { storeToRefs } from 'pinia';
|
||||||
|
|
@ -72,11 +73,6 @@ import useOptionStore from 'stores/options';
|
||||||
import { DialogContainer, DialogHeader } from 'components/dialog';
|
import { DialogContainer, DialogHeader } from 'components/dialog';
|
||||||
import KebabAction from 'src/components/shared/KebabAction.vue';
|
import KebabAction from 'src/components/shared/KebabAction.vue';
|
||||||
|
|
||||||
const currentSelectedMenu = ref<{ label: string; value: string }>({
|
|
||||||
label: '',
|
|
||||||
value: '',
|
|
||||||
});
|
|
||||||
|
|
||||||
const { t, locale } = useI18n();
|
const { t, locale } = useI18n();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
|
|
@ -208,20 +204,6 @@ const maxPageEmployee = ref<number>(1);
|
||||||
const pageSize = ref<number>(30);
|
const pageSize = ref<number>(30);
|
||||||
const dialogCustomerImageUpload = ref<InstanceType<typeof ImageUploadDialog>>();
|
const dialogCustomerImageUpload = ref<InstanceType<typeof ImageUploadDialog>>();
|
||||||
const dialogEmployeeImageUpload = ref<InstanceType<typeof ImageUploadDialog>>();
|
const dialogEmployeeImageUpload = ref<InstanceType<typeof ImageUploadDialog>>();
|
||||||
const dialogCreateCustomerItem = [
|
|
||||||
{
|
|
||||||
icon: 'mdi:office-building',
|
|
||||||
text: 'customer.employerLegalEntity',
|
|
||||||
iconColor: '--purple-10',
|
|
||||||
color: 'var(--purple-8-hsl)',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
icon: 'heroicons:user-solid',
|
|
||||||
text: 'customer.employerNaturalPerson',
|
|
||||||
iconColor: '--green-11',
|
|
||||||
color: 'var(--green-9-hsl)',
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// image
|
// image
|
||||||
const refreshImageState = ref(false);
|
const refreshImageState = ref(false);
|
||||||
|
|
@ -3848,6 +3830,7 @@ const emptyCreateDialog = ref(false);
|
||||||
{{ $t(`general.uploadFile`) }}
|
{{ $t(`general.uploadFile`) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<UploadFileGroup
|
<UploadFileGroup
|
||||||
v-model:current-id="currentFromDataEmployee.id"
|
v-model:current-id="currentFromDataEmployee.id"
|
||||||
v-model="currentFromDataEmployee.file"
|
v-model="currentFromDataEmployee.file"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,35 @@
|
||||||
import { QTableProps } from 'quasar';
|
import { QTableProps } from 'quasar';
|
||||||
|
|
||||||
|
export const dialogCreateCustomerItem = [
|
||||||
|
{
|
||||||
|
icon: 'mdi:office-building',
|
||||||
|
text: 'customer.employerLegalEntity',
|
||||||
|
iconColor: '--purple-10',
|
||||||
|
color: 'var(--purple-8-hsl)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'heroicons:user-solid',
|
||||||
|
text: 'customer.employerNaturalPerson',
|
||||||
|
iconColor: '--green-11',
|
||||||
|
color: 'var(--green-9-hsl)',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export const formMenuIcon = <
|
||||||
|
{ icon: string; color: string; bgColor: string }[]
|
||||||
|
>[
|
||||||
|
{
|
||||||
|
icon: 'mdi-office-building-outline',
|
||||||
|
color: 'hsl(var(--info-bg))',
|
||||||
|
bgColor: 'var(--surface-1)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'mdi-briefcase-outline',
|
||||||
|
color: 'hsl(var(--info-bg))',
|
||||||
|
bgColor: 'var(--surface-1)',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export const countryCode = [
|
export const countryCode = [
|
||||||
{
|
{
|
||||||
label: 'thai',
|
label: 'thai',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue