(),
{
gridView: false,
@@ -265,9 +267,10 @@ defineEmits<{
@click.stop="$emit('view', props.row)"
/>
();
defineEmits<{
@@ -76,6 +77,7 @@ defineEmits<{
{
@@ -195,8 +197,8 @@ defineEmits<{
}
:deep(
- .q-item__section.column.q-item__section--side.justify-center.q-item__section--avatar.q-focusable.relative-position.cursor-pointer
- ) {
+ .q-item__section.column.q-item__section--side.justify-center.q-item__section--avatar.q-focusable.relative-position.cursor-pointer
+) {
justify-content: start !important;
padding-right: 8px !important;
padding-top: 16px;
@@ -208,15 +210,15 @@ defineEmits<{
}
:deep(
- i.q-icon.mdi.mdi-chevron-down-circle.q-expansion-item__toggle-icon.q-expansion-item__toggle-icon--rotated
- ) {
+ i.q-icon.mdi.mdi-chevron-down-circle.q-expansion-item__toggle-icon.q-expansion-item__toggle-icon--rotated
+) {
color: var(--brand-1);
}
:deep(
- .q-item.q-item-type.row.no-wrap.q-item--dense.q-item--clickable.q-link.cursor-pointer.q-focusable.q-hoverable.expansion-rounded.surface-2
- .q-focus-helper
- ) {
+ .q-item.q-item-type.row.no-wrap.q-item--dense.q-item--clickable.q-link.cursor-pointer.q-focusable.q-hoverable.expansion-rounded.surface-2
+ .q-focus-helper
+) {
visibility: hidden;
}
diff --git a/src/components/05_quotation/TableQuotation.vue b/src/components/05_quotation/TableQuotation.vue
index a80a4e40..b219944a 100644
--- a/src/components/05_quotation/TableQuotation.vue
+++ b/src/components/05_quotation/TableQuotation.vue
@@ -19,6 +19,7 @@ const props = withDefaults(
page?: number;
pageSize?: number;
hideBtnPreview?: boolean;
+ hideAction?: boolean;
}>(),
{
row: () => [],
@@ -149,6 +150,7 @@ defineEmits<{
/>
import { BranchWithChildren } from 'stores/branch/types';
import KebabAction from './shared/KebabAction.vue';
-import { isRoleInclude } from 'stores/utils';
const nodes = defineModel<(any | BranchWithChildren)[]>('nodes', {
default: [],
@@ -120,11 +119,7 @@ defineEmits<{
/>
();
defineEmits<{
@@ -76,8 +78,10 @@ defineEmits<{
/>
{
{{ $t('branch.allBranch') }}
{
{
>
@@ -615,7 +615,7 @@ watch(
{
deleteBranchById(customerBranchFormData.id || '');
diff --git a/src/pages/03_customer-management/MainPage.vue b/src/pages/03_customer-management/MainPage.vue
index d90e1234..5ca98e30 100644
--- a/src/pages/03_customer-management/MainPage.vue
+++ b/src/pages/03_customer-management/MainPage.vue
@@ -6,7 +6,7 @@ import { useRoute, useRouter } from 'vue-router';
import { getUserId, getRole } from 'src/services/keycloak';
import { baseUrl, setPrefixName, waitAll } from 'src/stores/utils';
import { dateFormat } from 'src/utils/datetime';
-import { dialogCheckData } from 'stores/utils';
+import { dialogCheckData, canAccess } from 'stores/utils';
import useOcrStore from 'stores/ocr';
import useCustomerStore from 'stores/customer';
@@ -397,7 +397,11 @@ async function fetchListEmployee(opt?: {
employeeStats.value = await employeeStore.getStatsEmployee();
}
-async function triggerChangeStatus(id: string, status: string) {
+async function triggerChangeStatus(
+ id: string,
+ status: string,
+ employeeName?: string,
+) {
return await new Promise((resolve, reject) => {
dialog({
color: status !== 'INACTIVE' ? 'warning' : 'info',
@@ -412,7 +416,11 @@ async function triggerChangeStatus(id: string, status: string) {
: t('dialog.message.confirmChangeStatusOn'),
action: async () => {
if (currentTab.value === 'employee') {
- await toggleStatusEmployee(id, status === 'INACTIVE' ? false : true)
+ await toggleStatusEmployee(
+ id,
+ status === 'INACTIVE' ? false : true,
+ employeeName,
+ )
.then(resolve)
.catch(reject);
} else {
@@ -426,9 +434,14 @@ async function triggerChangeStatus(id: string, status: string) {
});
}
-async function toggleStatusEmployee(id: string, status: boolean) {
+async function toggleStatusEmployee(
+ id: string,
+ status: boolean,
+ employeeName: string,
+) {
const res = await employeeStore.editById(id, {
status: !status ? 'ACTIVE' : 'INACTIVE',
+ firstNameEN: employeeName,
});
if (res && employeeFormState.value.drawerModal)
currentFromDataEmployee.value.status = res.status;
@@ -658,7 +671,7 @@ const emptyCreateDialog = ref(false);
{
if (currentTab === 'employee') {
@@ -1391,6 +1404,7 @@ const emptyCreateDialog = ref(false);
/>
{
- triggerChangeStatus(item.id, item.status);
+ triggerChangeStatus(
+ item.id,
+ item.status,
+ item.firstNameEN,
+ );
}
"
/>
@@ -1889,6 +1918,7 @@ const emptyCreateDialog = ref(false);
"
>
+
@@ -4423,6 +4455,7 @@ const emptyCreateDialog = ref(false);
(customerFormState.branchIndex !== -1 &&
customerFormState.branchIndex !== idx)
"
+ :hide-delete="!canAccess('customer', 'edit')"
:readonly="customerFormState.branchIndex !== idx"
@edit="() => (customerFormState.branchIndex = idx)"
@cancel="() => customerFormUndo(false)"
@@ -4463,11 +4496,18 @@ const emptyCreateDialog = ref(false);
}
"
:title="
- employeeFormState.currentEmployee
- ? $i18n.locale === 'eng'
- ? `${employeeFormState.currentEmployee.firstNameEN} ${employeeFormState.currentEmployee.lastNameEN}`
- : `${employeeFormState.currentEmployee.firstName} ${employeeFormState.currentEmployee.lastName}`
- : '-'
+ setPrefixName(
+ {
+ namePrefix: employeeFormState.currentEmployee.namePrefix,
+ firstName:
+ employeeFormState.currentEmployee.firstName ||
+ employeeFormState.currentEmployee.firstNameEN,
+ lastName: employeeFormState.currentEmployee.lastName,
+ firstNameEN: employeeFormState.currentEmployee.firstNameEN,
+ lastNameEN: employeeFormState.currentEmployee.lastNameEN,
+ },
+ { locale },
+ )
"
:badge-class="
currentFromDataEmployee.gender === 'male'
@@ -4562,7 +4602,11 @@ const emptyCreateDialog = ref(false);
@update:toggle-status="
(v) => {
if (currentFromDataEmployee.id !== undefined)
- triggerChangeStatus(currentFromDataEmployee.id, v);
+ triggerChangeStatus(
+ currentFromDataEmployee.id,
+ v,
+ currentFromDataEmployee.firstNameEN,
+ );
}
"
:active="currentFromDataEmployee.status !== 'INACTIVE'"
@@ -4582,7 +4626,9 @@ const emptyCreateDialog = ref(false);
? setPrefixName(
{
namePrefix: employeeFormState.currentEmployee.namePrefix,
- firstName: employeeFormState.currentEmployee.firstName,
+ firstName:
+ employeeFormState.currentEmployee.firstName ||
+ employeeFormState.currentEmployee.firstNameEN,
lastName: employeeFormState.currentEmployee.lastName,
firstNameEN: employeeFormState.currentEmployee.firstNameEN,
lastNameEN: employeeFormState.currentEmployee.lastNameEN,
@@ -4878,7 +4924,10 @@ const emptyCreateDialog = ref(false);
type="button"
/>