refactor: responsive (#180)
* refactor: can open one dropdown whe lt.md * style: update MainLayout background color and fix avatar border class name * feat: add touch position binding for dropdown in ProfileMenu * refactor: enhance icon styling in DrawerComponent * fix: update screen size conditions * feat: add responsive search and filter functionality in MainPage * feat: update styling and functionality in BasicInformation and MainPage components * feat: package view mode improve layout and responsiveness * feat: improve layout and responsiveness of ProfileBanner component * feat: enhance TreeView component with improved icon layout and cursor pointer styling * feat: update DialogForm component to prevent text wrapping in the center column * feat: enhance FormDocument, PriceDataComponent, and BasicInfoProduct components with layout and styling improvements * feat: enhance ProfileBanner dark tab * feat: 02 => responsive & responsibleArea type * fix: layout header bg condition & 02 filter col * feat: 04 flow => add AddButton component and enhance layout in FormFlow and FlowDialog * feat: 07 => enhance layout and responsiveness * refactor: simplify header structure and improve layout consistency * fix: improve text color in ItemCard and adjust responsive breakpoints in product service group * refactor: 05 => enhance layout responsiveness and improve class bindings in quotation components * refactor: enhance styling and improve props flexibility in dialog and select components * refactor: 05 => enhance layout responsiveness in quotation components * refactor: 05 => enhance layout responsiveness * refactor: 05 => formWorkerAdd * refactor: 05 => formWorkerAdd Product table * refactor: 05 => improve layout responsiveness and enhance component structure * refactor: enhance grid view handling and improve component imports * refactor: improve column classes for better layout consistency * refactor: 09 => enhance layout structure and improve responsiveness in task order views * refactor: 10 => enhance invoice main page layout and improve component interactions * refactor: 13 => enhance receipt main page layout and improve component interactions * refactor: 11 => enhance layout and improve responsiveness in credit note pages * refactor: 01 => screen.sm search & filter * refactor: 01 => improve layout responsiveness and fix variable naming in branch management forms --------- Co-authored-by: puriphatt <puriphat@frappet.com>
This commit is contained in:
parent
79ec995547
commit
e0c1725001
45 changed files with 993 additions and 609 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<script lang="ts" setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { QSelect, useQuasar } from 'quasar';
|
||||
import { computed, nextTick, onMounted, reactive, ref, watch } from 'vue';
|
||||
import {
|
||||
baseUrl,
|
||||
|
|
@ -13,10 +13,9 @@ import { ProductTree, quotationProductTree } from './utils';
|
|||
|
||||
// NOTE: Import stores
|
||||
import { dateFormat, calculateAge, dateFormatJS } from 'src/utils/datetime';
|
||||
import { useEmployeeForm } from 'src/pages/03_customer-management/form';
|
||||
import { useQuotationStore } from 'src/stores/quotations';
|
||||
import useProductServiceStore from 'stores/product-service';
|
||||
import { waitAll, calculateDaysUntilExpire, dialog } from 'src/stores/utils';
|
||||
import { calculateDaysUntilExpire, dialog } from 'src/stores/utils';
|
||||
import useEmployeeStore from 'stores/employee';
|
||||
import { useInvoice, useReceipt, usePayment } from 'stores/payment';
|
||||
import useCustomerStore from 'stores/customer';
|
||||
|
|
@ -28,13 +27,12 @@ import { deleteItem } from 'stores/utils';
|
|||
import { RequestData, RequestDataStatus } from 'src/stores/request-list/types';
|
||||
import { View } from './types.ts';
|
||||
import {
|
||||
EmployeeWorker,
|
||||
PayCondition,
|
||||
ProductRelation,
|
||||
ProductServiceList,
|
||||
QuotationPayload,
|
||||
} from 'src/stores/quotations/types';
|
||||
import { Employee, EmployeeWork } from 'src/stores/employee/types';
|
||||
import { Employee } from 'src/stores/employee/types';
|
||||
import { Receipt } from 'src/stores/payment/types';
|
||||
import {
|
||||
ProductGroup,
|
||||
|
|
@ -50,7 +48,6 @@ import ProductItem from 'components/05_quotation/ProductItem.vue';
|
|||
import WorkerItem from 'components/05_quotation/WorkerItem.vue';
|
||||
import ToggleButton from 'components/button/ToggleButton.vue';
|
||||
import FormAbout from 'components/05_quotation/FormAbout.vue';
|
||||
import SelectZone from 'components/shared/SelectZone.vue';
|
||||
import ImportWorker from './ImportWorker.vue';
|
||||
import {
|
||||
AddButton,
|
||||
|
|
@ -127,7 +124,7 @@ const {
|
|||
const { data: config } = storeToRefs(configStore);
|
||||
|
||||
const receiptList = ref<Receipt[]>([]);
|
||||
|
||||
const refStatusFilter = ref<InstanceType<typeof QSelect>>();
|
||||
const templateForm = ref<string>('');
|
||||
const templateFormOption = ref<{ label: string; value: string }[]>([]);
|
||||
|
||||
|
|
@ -1072,25 +1069,25 @@ watch(
|
|||
},
|
||||
);
|
||||
|
||||
async function searchEmployee(text: string) {
|
||||
let query: string | undefined = text;
|
||||
let pageSize = 50;
|
||||
// async function searchEmployee(text: string) {
|
||||
// let query: string | undefined = text;
|
||||
// let pageSize = 50;
|
||||
|
||||
if (!text) {
|
||||
query = undefined;
|
||||
pageSize = 9999;
|
||||
}
|
||||
// if (!text) {
|
||||
// query = undefined;
|
||||
// pageSize = 9999;
|
||||
// }
|
||||
|
||||
const retEmp = await customerStore.fetchBranchEmployee(
|
||||
quotationFormData.value.customerBranchId,
|
||||
{
|
||||
query: query,
|
||||
pageSize: pageSize,
|
||||
passport: true,
|
||||
},
|
||||
);
|
||||
if (retEmp) workerList.value = retEmp.data.result;
|
||||
}
|
||||
// const retEmp = await customerStore.fetchBranchEmployee(
|
||||
// quotationFormData.value.customerBranchId,
|
||||
// {
|
||||
// query: query,
|
||||
// pageSize: pageSize,
|
||||
// passport: true,
|
||||
// },
|
||||
// );
|
||||
// if (retEmp) workerList.value = retEmp.data.result;
|
||||
// }
|
||||
|
||||
function storeDataLocal() {
|
||||
quotationFormData.value.productServiceList = productServiceList.value;
|
||||
|
|
@ -1308,12 +1305,24 @@ async function formDownload() {
|
|||
|
||||
<div
|
||||
v-if="quotationFormState.mode !== 'create'"
|
||||
class="column col-2 q-ml-auto"
|
||||
class="column col-sm-2 col-12 q-ml-auto"
|
||||
style="gap: 10px"
|
||||
>
|
||||
<div class="row justify-end">
|
||||
<BadgeComponent :title-i18n="$t('general.laborIdentified')" />
|
||||
<div
|
||||
class="row"
|
||||
:class="{
|
||||
'justify-end': $q.screen.gt.xs,
|
||||
'q-pl-xl q-mt-sm': $q.screen.lt.sm,
|
||||
}"
|
||||
>
|
||||
<BadgeComponent
|
||||
:title-i18n="$t('general.laborIdentified')"
|
||||
:class="{
|
||||
'q-ml-md': $q.screen.lt.sm,
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="row items-center justify-between surface-1 rounded q-pa-xs"
|
||||
style="height: 40px; border-radius: 40px"
|
||||
|
|
@ -1895,9 +1904,25 @@ async function formDownload() {
|
|||
<template #prepend>
|
||||
<q-icon name="mdi-magnify" />
|
||||
</template>
|
||||
<template v-if="$q.screen.lt.md" v-slot:append>
|
||||
<span class="row">
|
||||
<q-separator vertical />
|
||||
<q-btn
|
||||
icon="mdi-filter-variant"
|
||||
unelevated
|
||||
class="q-ml-sm"
|
||||
padding="4px"
|
||||
size="sm"
|
||||
rounded
|
||||
@click="refStatusFilter?.showPopup"
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
</q-input>
|
||||
|
||||
<q-select
|
||||
v-show="$q.screen.gt.sm"
|
||||
ref="refStatusFilter"
|
||||
v-model="quotationFormState.statusFilterRequest"
|
||||
outlined
|
||||
dense
|
||||
|
|
@ -2093,9 +2118,10 @@ async function formDownload() {
|
|||
</section>
|
||||
</template>
|
||||
|
||||
<div class="surface-1 q-pa-md flex" style="gap: var(--size-2)">
|
||||
<div class="surface-1 q-pa-md row" style="gap: var(--size-2)">
|
||||
<SelectInput
|
||||
class="q-mr-sm"
|
||||
class="q-mr-xl col-md-3 col-12"
|
||||
incremental
|
||||
v-model="templateForm"
|
||||
id="quotation-branch"
|
||||
:option="templateFormOption"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue