refactor: add id
This commit is contained in:
parent
2ee65233f2
commit
758b005768
12 changed files with 38 additions and 6 deletions
|
|
@ -127,7 +127,7 @@ defineEmits<{
|
||||||
|
|
||||||
<q-td class="text-right">
|
<q-td class="text-right">
|
||||||
<q-btn
|
<q-btn
|
||||||
:id="`btn-eye-${props.row.firstName}`"
|
:id="`btn-preview-${props.row.workName}`"
|
||||||
icon="mdi-play-box-outline"
|
icon="mdi-play-box-outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
dense
|
dense
|
||||||
|
|
@ -137,7 +137,7 @@ defineEmits<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
:id="`btn-eye-${props.row.firstName}`"
|
:id="`btn-eye-${props.row.workName}`"
|
||||||
icon="mdi-eye-outline"
|
icon="mdi-eye-outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
dense
|
dense
|
||||||
|
|
@ -147,7 +147,7 @@ defineEmits<{
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<KebabAction
|
<KebabAction
|
||||||
:idName="`btn-kebab-${props.row.firstName}`"
|
:idName="`btn-kebab-${props.row.workName}`"
|
||||||
status="'ACTIVE'"
|
status="'ACTIVE'"
|
||||||
hide-toggle
|
hide-toggle
|
||||||
hide-delete
|
hide-delete
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,7 @@ onMounted(async () => {
|
||||||
v-model="value"
|
v-model="value"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
incremental
|
incremental
|
||||||
|
for="select-customer"
|
||||||
:label
|
:label
|
||||||
:placeholder
|
:placeholder
|
||||||
:readonly
|
:readonly
|
||||||
|
|
@ -129,6 +130,8 @@ onMounted(async () => {
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@click.stop="$emit('create')"
|
@click.stop="$emit('create')"
|
||||||
|
for="select-customer-add-new"
|
||||||
|
id="select-customer-add-new"
|
||||||
>
|
>
|
||||||
<q-item-section>
|
<q-item-section>
|
||||||
<span class="row items-center">
|
<span class="row items-center">
|
||||||
|
|
|
||||||
|
|
@ -142,6 +142,7 @@ function selectedIndex(item: Employee) {
|
||||||
</template>
|
</template>
|
||||||
<template v-if="col.name === '#check'">
|
<template v-if="col.name === '#check'">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
|
id="select-worker-all"
|
||||||
v-model="props.selected"
|
v-model="props.selected"
|
||||||
@update:model-value="(v) => handleUpdate()"
|
@update:model-value="(v) => handleUpdate()"
|
||||||
size="sm"
|
size="sm"
|
||||||
|
|
@ -193,7 +194,11 @@ function selectedIndex(item: Employee) {
|
||||||
!disabledWorkerId?.some((id) => id === props.row.id)
|
!disabledWorkerId?.some((id) => id === props.row.id)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<q-checkbox v-model="props.selected" size="sm" />
|
<q-checkbox
|
||||||
|
v-model="props.selected"
|
||||||
|
size="sm"
|
||||||
|
:id="`select-worker-${props.row.firstName}`"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</q-td>
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
|
|
|
||||||
|
|
@ -894,6 +894,7 @@ async function storeDataLocal(id: string) {
|
||||||
:text="value.text"
|
:text="value.text"
|
||||||
:icon-color="value.iconColor"
|
:icon-color="value.iconColor"
|
||||||
:bg-color="value.color"
|
:bg-color="value.color"
|
||||||
|
:id="`btn-add-new-${value.text}`"
|
||||||
@trigger="
|
@trigger="
|
||||||
() => {
|
() => {
|
||||||
triggerCreateCustomerd({
|
triggerCreateCustomerd({
|
||||||
|
|
|
||||||
|
|
@ -514,6 +514,7 @@ onMounted(async () => {
|
||||||
|
|
||||||
<div class="q-ml-auto row" style="gap: 10px">
|
<div class="q-ml-auto row" style="gap: 10px">
|
||||||
<q-btn
|
<q-btn
|
||||||
|
id="btn-payment"
|
||||||
@click.stop
|
@click.stop
|
||||||
unelevated
|
unelevated
|
||||||
padding="4px 8px"
|
padding="4px 8px"
|
||||||
|
|
@ -552,6 +553,7 @@ onMounted(async () => {
|
||||||
:key="opts.status"
|
:key="opts.status"
|
||||||
>
|
>
|
||||||
<q-item
|
<q-item
|
||||||
|
:id="`btn-payment-${opts.status}`"
|
||||||
v-if="
|
v-if="
|
||||||
(p.paymentStatus === 'PaymentWait' &&
|
(p.paymentStatus === 'PaymentWait' &&
|
||||||
opts.status !== 'PaymentRetry') ||
|
opts.status !== 'PaymentRetry') ||
|
||||||
|
|
@ -591,6 +593,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
rounded
|
rounded
|
||||||
padding="0"
|
padding="0"
|
||||||
|
id="btn-show-file"
|
||||||
:icon="`mdi-chevron-${state.payExpansion[i] ? 'down' : 'up'}`"
|
:icon="`mdi-chevron-${state.payExpansion[i] ? 'down' : 'up'}`"
|
||||||
@click.stop="
|
@click.stop="
|
||||||
state.payExpansion[i] = !state.payExpansion[i]
|
state.payExpansion[i] = !state.payExpansion[i]
|
||||||
|
|
@ -625,6 +628,7 @@ onMounted(async () => {
|
||||||
}}
|
}}
|
||||||
<q-btn
|
<q-btn
|
||||||
unelevated
|
unelevated
|
||||||
|
id="btn-upload-file"
|
||||||
:label="$t('general.upload')"
|
:label="$t('general.upload')"
|
||||||
rounded
|
rounded
|
||||||
class="app-bg-info q-mt-sm"
|
class="app-bg-info q-mt-sm"
|
||||||
|
|
|
||||||
|
|
@ -1421,6 +1421,7 @@ async function formDownload() {
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
v-for="value in statusQuotationForm"
|
v-for="value in statusQuotationForm"
|
||||||
|
:id="`btn-status-${value.title}`"
|
||||||
:key="value.title"
|
:key="value.title"
|
||||||
class="q-pa-sm bordered status-color row items-center"
|
class="q-pa-sm bordered status-color row items-center"
|
||||||
:class="{
|
:class="{
|
||||||
|
|
@ -1553,6 +1554,8 @@ async function formDownload() {
|
||||||
</div>
|
</div>
|
||||||
<nav class="q-ml-auto">
|
<nav class="q-ml-auto">
|
||||||
<AddButton
|
<AddButton
|
||||||
|
id="btn-add-worker"
|
||||||
|
for="btn-add-worker"
|
||||||
v-if="
|
v-if="
|
||||||
!readonly &&
|
!readonly &&
|
||||||
(!quotationFormState.source ||
|
(!quotationFormState.source ||
|
||||||
|
|
@ -1565,6 +1568,8 @@ async function formDownload() {
|
||||||
@click.stop="triggerSelectEmployeeDialog"
|
@click.stop="triggerSelectEmployeeDialog"
|
||||||
/>
|
/>
|
||||||
<AddButton
|
<AddButton
|
||||||
|
id="btn-add-worker"
|
||||||
|
for="btn-add-worker"
|
||||||
v-if="
|
v-if="
|
||||||
!!quotationFormState.source &&
|
!!quotationFormState.source &&
|
||||||
quotationFormState.source.quotationStatus !==
|
quotationFormState.source.quotationStatus !==
|
||||||
|
|
@ -1621,6 +1626,7 @@ async function formDownload() {
|
||||||
v-if="!readonly"
|
v-if="!readonly"
|
||||||
icon-only
|
icon-only
|
||||||
class="q-ml-auto"
|
class="q-ml-auto"
|
||||||
|
id="trigger-product-service-dialog"
|
||||||
@click.stop="triggerProductServiceDialog"
|
@click.stop="triggerProductServiceDialog"
|
||||||
/>
|
/>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
@ -2243,6 +2249,7 @@ async function formDownload() {
|
||||||
outlined
|
outlined
|
||||||
icon="mdi-play-box-outline"
|
icon="mdi-play-box-outline"
|
||||||
color="207 96% 32%"
|
color="207 96% 32%"
|
||||||
|
id="btn-view-example"
|
||||||
@click="storeDataLocal"
|
@click="storeDataLocal"
|
||||||
>
|
>
|
||||||
{{ $t('general.view', { msg: $t('general.example') }) }}
|
{{ $t('general.view', { msg: $t('general.example') }) }}
|
||||||
|
|
@ -2258,6 +2265,7 @@ async function formDownload() {
|
||||||
solid
|
solid
|
||||||
icon="mdi-account-multiple-check-outline"
|
icon="mdi-account-multiple-check-outline"
|
||||||
color="207 96% 32%"
|
color="207 96% 32%"
|
||||||
|
id="btn-submit-accepted"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
submitAccepted();
|
submitAccepted();
|
||||||
|
|
@ -2273,6 +2281,7 @@ async function formDownload() {
|
||||||
solid
|
solid
|
||||||
icon="mdi-account-multiple-check-outline"
|
icon="mdi-account-multiple-check-outline"
|
||||||
color="207 96% 32%"
|
color="207 96% 32%"
|
||||||
|
id="btn-select-invoice"
|
||||||
@click="
|
@click="
|
||||||
() => {
|
() => {
|
||||||
view = View.Invoice;
|
view = View.Invoice;
|
||||||
|
|
|
||||||
|
|
@ -508,6 +508,7 @@ watch(
|
||||||
flat
|
flat
|
||||||
rounded
|
rounded
|
||||||
icon="mdi-store-plus-outline"
|
icon="mdi-store-plus-outline"
|
||||||
|
id="trigger-add-dialog"
|
||||||
@click="triggerAddDialog"
|
@click="triggerAddDialog"
|
||||||
/>
|
/>
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|
@ -515,6 +516,7 @@ watch(
|
||||||
flat
|
flat
|
||||||
rounded
|
rounded
|
||||||
icon="mdi-information-outline"
|
icon="mdi-information-outline"
|
||||||
|
id="trigger-info"
|
||||||
@click="triggerInfo"
|
@click="triggerInfo"
|
||||||
:color="pageState.infoDrawer ? 'info' : ''"
|
:color="pageState.infoDrawer ? 'info' : ''"
|
||||||
style="color: hsl(var(--text-mute))"
|
style="color: hsl(var(--text-mute))"
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,7 @@ watch(() => state.search, getWorkerList);
|
||||||
<q-menu class="bordered" ref="refMenu">
|
<q-menu class="bordered" ref="refMenu">
|
||||||
<q-list>
|
<q-list>
|
||||||
<q-item
|
<q-item
|
||||||
|
id="trigger-create-employee"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
dense
|
dense
|
||||||
clickable
|
clickable
|
||||||
|
|
@ -308,6 +309,7 @@ watch(() => state.search, getWorkerList);
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
<q-item
|
<q-item
|
||||||
|
id="import-worker"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
dense
|
dense
|
||||||
clickable
|
clickable
|
||||||
|
|
@ -470,6 +472,7 @@ watch(() => state.search, getWorkerList);
|
||||||
<template #grid="{ item: emp, index }">
|
<template #grid="{ item: emp, index }">
|
||||||
<div :key="emp.id" class="col-md-2 col-sm-6 col-12">
|
<div :key="emp.id" class="col-md-2 col-sm-6 col-12">
|
||||||
<button
|
<button
|
||||||
|
:id="`select-worker-${emp.firstName}`"
|
||||||
class="selectable-item full-width"
|
class="selectable-item full-width"
|
||||||
:class="{
|
:class="{
|
||||||
['selectable-item__selected']:
|
['selectable-item__selected']:
|
||||||
|
|
@ -520,11 +523,12 @@ watch(() => state.search, getWorkerList);
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="q-gutter-x-xs q-ml-auto">
|
<div class="q-gutter-x-xs q-ml-auto">
|
||||||
<CancelButton outlined @click="clean" />
|
<CancelButton id="btn-cancel" outlined @click="clean" />
|
||||||
<MainButton
|
<MainButton
|
||||||
icon="mdi-check"
|
icon="mdi-check"
|
||||||
color="207 96% 32%"
|
color="207 96% 32%"
|
||||||
solid
|
solid
|
||||||
|
id="btn-success"
|
||||||
@click="
|
@click="
|
||||||
emits('success', {
|
emits('success', {
|
||||||
worker: workerSelected,
|
worker: workerSelected,
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ function goToRequestList(id: string) {
|
||||||
<template v-if="col.name === '#codeRequest'">
|
<template v-if="col.name === '#codeRequest'">
|
||||||
<span
|
<span
|
||||||
class="cursor-pointer link"
|
class="cursor-pointer link"
|
||||||
|
:id="`go-to-request-list-${props.row.code}`"
|
||||||
@click="goToRequestList(props.row.id)"
|
@click="goToRequestList(props.row.id)"
|
||||||
>
|
>
|
||||||
{{ props.row.code }}
|
{{ props.row.code }}
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ function getEmployeeName(
|
||||||
</q-td>
|
</q-td>
|
||||||
<q-td class="text-right">
|
<q-td class="text-right">
|
||||||
<q-btn
|
<q-btn
|
||||||
:id="`btn-eye-${props.row.quotation.workName}`"
|
:id="`btn-eye-${props.row.code}`"
|
||||||
icon="mdi-eye-outline"
|
icon="mdi-eye-outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
dense
|
dense
|
||||||
|
|
@ -196,6 +196,7 @@ function getEmployeeName(
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<KebabAction
|
<KebabAction
|
||||||
|
:id-name="`btn-kebab-${props.row.code}`"
|
||||||
hide-edit
|
hide-edit
|
||||||
hide-toggle
|
hide-toggle
|
||||||
hide-view
|
hide-view
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ const visible = computed(() =>
|
||||||
|
|
||||||
<template v-if="col.name === '#action'">
|
<template v-if="col.name === '#action'">
|
||||||
<KebabAction
|
<KebabAction
|
||||||
|
:id-name="`btn-kebab-${props.row.quotation.workName}`"
|
||||||
hide-edit
|
hide-edit
|
||||||
hide-toggle
|
hide-toggle
|
||||||
:hide-delete
|
:hide-delete
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,7 @@ const visible = computed(() =>
|
||||||
|
|
||||||
<template v-if="col.name === '#action'">
|
<template v-if="col.name === '#action'">
|
||||||
<KebabAction
|
<KebabAction
|
||||||
|
:id-name="`btn-kebab-${props.row.workName}`"
|
||||||
hide-toggle
|
hide-toggle
|
||||||
hide-edit
|
hide-edit
|
||||||
@edit="$emit('edit', props.row)"
|
@edit="$emit('edit', props.row)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue