This commit is contained in:
parent
a1ed625d32
commit
2b1e3b12a4
12 changed files with 54 additions and 18 deletions
|
|
@ -37,6 +37,8 @@ withDefaults(
|
||||||
:class="{ 'link cursor-pointer': clickable }"
|
:class="{ 'link cursor-pointer': clickable }"
|
||||||
v-if="typeof value === 'string'"
|
v-if="typeof value === 'string'"
|
||||||
@click="clickable ? $emit('labelClick', value, null) : undefined"
|
@click="clickable ? $emit('labelClick', value, null) : undefined"
|
||||||
|
:id="`link-${value}`"
|
||||||
|
:for="`link-${value}`"
|
||||||
>
|
>
|
||||||
{{ value }}
|
{{ value }}
|
||||||
<q-tooltip v-if="tooltip" :delay="500">{{ value }}</q-tooltip>
|
<q-tooltip v-if="tooltip" :delay="500">{{ value }}</q-tooltip>
|
||||||
|
|
@ -47,6 +49,8 @@ withDefaults(
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="$emit('labelClick', item, index)"
|
@click="$emit('labelClick', item, index)"
|
||||||
class="link cursor-pointer"
|
class="link cursor-pointer"
|
||||||
|
:id="`link-${item}`"
|
||||||
|
:for="`link-${item}`"
|
||||||
>
|
>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
<span v-if="index < value.length - 1">, </span>
|
<span v-if="index < value.length - 1">, </span>
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ let defaultFilter: (
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
prefix?: string;
|
||||||
id?: string;
|
id?: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
option: T[];
|
option: T[];
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@ defineEmits<{
|
||||||
|
|
||||||
type ExclusiveProps = {
|
type ExclusiveProps = {
|
||||||
selectFirstValue?: boolean;
|
selectFirstValue?: boolean;
|
||||||
|
prefix?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const props = defineProps<SelectProps<typeof getList> & ExclusiveProps>();
|
const props = defineProps<SelectProps<typeof getList> & ExclusiveProps>();
|
||||||
|
|
@ -71,6 +72,7 @@ function setDefaultValue() {
|
||||||
<SelectInput
|
<SelectInput
|
||||||
v-model="value"
|
v-model="value"
|
||||||
incremental
|
incremental
|
||||||
|
:id="`${prefix || 'nome'}-select-user`"
|
||||||
:label
|
:label
|
||||||
:placeholder
|
:placeholder
|
||||||
:readonly
|
:readonly
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ const props = withDefaults(
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
listDocument: string[];
|
listDocument: string[];
|
||||||
currentId: { customer: string; employee: string };
|
currentId: { customer: string; employee: string };
|
||||||
|
prefix?: string;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
listDocument: () => [],
|
listDocument: () => [],
|
||||||
|
|
@ -244,14 +245,14 @@ function changeCustomerTab(opts: { tab: 'customer' | 'employee' }) {
|
||||||
<nav class="q-ml-auto row" v-if="!readonly">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<CancelButton
|
<CancelButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
:id="`btn-docs-${props.prefix || 'nome'}-info-basic-undo`"
|
||||||
icon-only
|
icon-only
|
||||||
type="button"
|
type="button"
|
||||||
@click.stop="triggerCancel"
|
@click.stop="triggerCancel"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
v-if="!state.isEdit"
|
v-if="!state.isEdit"
|
||||||
id="btn-info-basic-edit"
|
:id="`btn-docs-${props.prefix || 'nome'}-info-basic-edit`"
|
||||||
icon-only
|
icon-only
|
||||||
@click.stop="triggerEdit"
|
@click.stop="triggerEdit"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { useRequestList } from 'src/stores/request-list';
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
step: Step;
|
step: Step;
|
||||||
|
prefix?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const requestListStore = useRequestList();
|
const requestListStore = useRequestList();
|
||||||
|
|
@ -100,21 +101,21 @@ function assignToForm() {
|
||||||
<nav class="q-ml-auto row" v-if="!readonly">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
:id="`btn-duty-${props.prefix || 'nome'}-info-basic-undo`"
|
||||||
icon-only
|
icon-only
|
||||||
type="button"
|
type="button"
|
||||||
@click.stop="triggerUndo"
|
@click.stop="triggerUndo"
|
||||||
/>
|
/>
|
||||||
<SaveButton
|
<SaveButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-save"
|
:id="`btn-duty-${props.prefix || 'nome'}-info-basic-save`"
|
||||||
icon-only
|
icon-only
|
||||||
type="submit"
|
type="submit"
|
||||||
@click.stop="triggerSubmit"
|
@click.stop="triggerSubmit"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
v-if="!state.isEdit"
|
v-if="!state.isEdit"
|
||||||
id="btn-info-basic-edit"
|
:id="`btn-duty-${props.prefix || 'nome'}-info-basic-edit`"
|
||||||
icon-only
|
icon-only
|
||||||
@click.stop="triggerEdit"
|
@click.stop="triggerEdit"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ const props = defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
step: Step;
|
step: Step;
|
||||||
requestWorkId: string;
|
requestWorkId: string;
|
||||||
|
prefix?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const requestListStore = useRequestList();
|
const requestListStore = useRequestList();
|
||||||
|
|
@ -90,21 +91,21 @@ function assignToForm() {
|
||||||
<nav class="q-ml-auto row" v-if="!readonly">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
:id="`btn-form-${props.prefix || 'nome'}-info-basic-undo`"
|
||||||
icon-only
|
icon-only
|
||||||
type="button"
|
type="button"
|
||||||
@click.stop="triggerUndo"
|
@click.stop="triggerUndo"
|
||||||
/>
|
/>
|
||||||
<SaveButton
|
<SaveButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-save"
|
:id="`btn-form-${props.prefix || 'nome'}-info-basic-save`"
|
||||||
icon-only
|
icon-only
|
||||||
type="submit"
|
type="submit"
|
||||||
@click.stop="triggerSubmit"
|
@click.stop="triggerSubmit"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
v-if="!state.isEdit"
|
v-if="!state.isEdit"
|
||||||
id="btn-info-basic-edit"
|
:id="`btn-form-${props.prefix || 'nome'}-info-basic-edit`"
|
||||||
icon-only
|
icon-only
|
||||||
@click.stop="triggerEdit"
|
@click.stop="triggerEdit"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ const responsibleUserId = defineModel<string>('responsibleUserId', {
|
||||||
defineProps<{
|
defineProps<{
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
districtId?: string;
|
districtId?: string;
|
||||||
|
prefix?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
watch(responsibleUserLocal, (lhs, rhs) => {
|
watch(responsibleUserLocal, (lhs, rhs) => {
|
||||||
|
|
@ -27,6 +28,8 @@ watch(responsibleUserLocal, (lhs, rhs) => {
|
||||||
:label="$t('requestList.localEmployee')"
|
:label="$t('requestList.localEmployee')"
|
||||||
:disable="readonly"
|
:disable="readonly"
|
||||||
class="col"
|
class="col"
|
||||||
|
:id="`${prefix || 'nome'}-radio-local-employee`"
|
||||||
|
:for="`${prefix || 'nome'}-radio-local-employee`"
|
||||||
/>
|
/>
|
||||||
<q-radio
|
<q-radio
|
||||||
v-model="responsibleUserLocal"
|
v-model="responsibleUserLocal"
|
||||||
|
|
@ -34,6 +37,8 @@ watch(responsibleUserLocal, (lhs, rhs) => {
|
||||||
:label="$t('requestList.nonLocalEmployee')"
|
:label="$t('requestList.nonLocalEmployee')"
|
||||||
:disable="readonly"
|
:disable="readonly"
|
||||||
class="col"
|
class="col"
|
||||||
|
:id="`${prefix || 'nome'}-radio-non-local-employee`"
|
||||||
|
:for="`${prefix || 'nome'}-radio-non-local-employee`"
|
||||||
/>
|
/>
|
||||||
<div class="col" />
|
<div class="col" />
|
||||||
<div class="offset-md-7"></div>
|
<div class="offset-md-7"></div>
|
||||||
|
|
@ -52,6 +57,8 @@ watch(responsibleUserLocal, (lhs, rhs) => {
|
||||||
}"
|
}"
|
||||||
:readonly
|
:readonly
|
||||||
:label="$t('general.select', { msg: $t('personnel.MESSENGER') })"
|
:label="$t('general.select', { msg: $t('personnel.MESSENGER') })"
|
||||||
|
:id="`${prefix || 'nome'}-select-user`"
|
||||||
|
:for="`${prefix || 'nome'}-select-user`"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ const props = defineProps<{
|
||||||
step: Step;
|
step: Step;
|
||||||
responsibleAreaDistrictId?: string;
|
responsibleAreaDistrictId?: string;
|
||||||
defaultMessenger?: string;
|
defaultMessenger?: string;
|
||||||
|
prefix?: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
@ -116,21 +117,21 @@ function assignToForm() {
|
||||||
<nav class="q-ml-auto row" v-if="!readonly">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
:id="`btn-messenger-${props.prefix || 'nome'}-info-basic-undo`"
|
||||||
icon-only
|
icon-only
|
||||||
type="button"
|
type="button"
|
||||||
@click.stop="triggerUndo"
|
@click.stop="triggerUndo"
|
||||||
/>
|
/>
|
||||||
<SaveButton
|
<SaveButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-save"
|
:id="`btn-messenger-${props.prefix || 'nome'}-info-basic-save`"
|
||||||
icon-only
|
icon-only
|
||||||
type="submit"
|
type="submit"
|
||||||
@click.stop="(e) => refForm?.submit(e)"
|
@click.stop="(e) => refForm?.submit(e)"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
v-if="!state.isEdit"
|
v-if="!state.isEdit"
|
||||||
id="btn-info-basic-edit"
|
:id="`btn-messenger-${props.prefix || 'nome'}-info-basic-edit`"
|
||||||
icon-only
|
icon-only
|
||||||
@click.stop="triggerEdit"
|
@click.stop="triggerEdit"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -157,6 +158,7 @@ function assignToForm() {
|
||||||
v-model:responsible-user-local="formData.responsibleUserLocal"
|
v-model:responsible-user-local="formData.responsibleUserLocal"
|
||||||
v-model:responsible-user-id="formData.responsibleUserId"
|
v-model:responsible-user-id="formData.responsibleUserId"
|
||||||
:district-id="responsibleAreaDistrictId"
|
:district-id="responsibleAreaDistrictId"
|
||||||
|
:prefix
|
||||||
/>
|
/>
|
||||||
</q-form>
|
</q-form>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ function changeableStatus(currentStatus?: RequestWorkStatus) {
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<q-expansion-item
|
<q-expansion-item
|
||||||
|
:id="`expansion-${product?.name || name}`"
|
||||||
|
:for="`expansion-${product?.name || name}`"
|
||||||
dense
|
dense
|
||||||
:class="{ 'status-unpaid': !paySuccess }"
|
:class="{ 'status-unpaid': !paySuccess }"
|
||||||
class="overflow-hidden"
|
class="overflow-hidden"
|
||||||
|
|
@ -146,6 +148,8 @@ function changeableStatus(currentStatus?: RequestWorkStatus) {
|
||||||
<div class="q-ml-auto q-gutter-y-xs">
|
<div class="q-ml-auto q-gutter-y-xs">
|
||||||
<div class="justify-end flex">
|
<div class="justify-end flex">
|
||||||
<q-btn-dropdown
|
<q-btn-dropdown
|
||||||
|
:id="`btn-dropdown-${product?.name || name}`"
|
||||||
|
:for="`btn-dropdown-${product?.name || name}`"
|
||||||
:disable="
|
:disable="
|
||||||
readonly || changeableStatus(status?.workStatus).length === 0
|
readonly || changeableStatus(status?.workStatus).length === 0
|
||||||
"
|
"
|
||||||
|
|
@ -197,6 +201,8 @@ function changeableStatus(currentStatus?: RequestWorkStatus) {
|
||||||
<q-list dense>
|
<q-list dense>
|
||||||
<q-item
|
<q-item
|
||||||
v-for="(value, index) in changeableStatus(status?.workStatus)"
|
v-for="(value, index) in changeableStatus(status?.workStatus)"
|
||||||
|
:id="`btn-dropdown-${product?.name || name}-${value}`"
|
||||||
|
:for="`btn-dropdown-${product?.name || name}-${value}`"
|
||||||
:key="index"
|
:key="index"
|
||||||
clickable
|
clickable
|
||||||
v-close-popup
|
v-close-popup
|
||||||
|
|
@ -271,15 +277,15 @@ function changeableStatus(currentStatus?: RequestWorkStatus) {
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(
|
: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);
|
color: var(--brand-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(
|
:deep(
|
||||||
.q-item.q-item-type.row.no-wrap.q-item--dense.q-item--clickable.q-link.cursor-pointer.q-focusable.q-hoverable.surface-1
|
.q-item.q-item-type.row.no-wrap.q-item--dense.q-item--clickable.q-link.cursor-pointer.q-focusable.q-hoverable.surface-1
|
||||||
.q-focus-helper
|
.q-focus-helper
|
||||||
) {
|
) {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ const props = withDefaults(
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
propertiesToShow: (PropString | PropNumber | PropDate | PropOptions)[];
|
propertiesToShow: (PropString | PropNumber | PropDate | PropOptions)[];
|
||||||
requestListData: RequestData;
|
requestListData: RequestData;
|
||||||
|
prefix?: string;
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
id: '',
|
id: '',
|
||||||
|
|
@ -128,7 +129,7 @@ defineEmits<{
|
||||||
<nav class="q-ml-auto row" v-if="!readonly">
|
<nav class="q-ml-auto row" v-if="!readonly">
|
||||||
<UndoButton
|
<UndoButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-undo"
|
:id="`btn-properties-${props.prefix || 'nome'}-info-basic-undo`"
|
||||||
icon-only
|
icon-only
|
||||||
type="button"
|
type="button"
|
||||||
@click.stop="triggerUndo"
|
@click.stop="triggerUndo"
|
||||||
|
|
@ -136,13 +137,14 @@ defineEmits<{
|
||||||
<SaveButton
|
<SaveButton
|
||||||
v-if="state.isEdit"
|
v-if="state.isEdit"
|
||||||
id="btn-info-basic-save"
|
id="btn-info-basic-save"
|
||||||
|
:id="`btn-properties-${props.prefix || 'nome'}-info-basic-save`"
|
||||||
icon-only
|
icon-only
|
||||||
type="submit"
|
type="submit"
|
||||||
@click.stop="triggerSubmit"
|
@click.stop="triggerSubmit"
|
||||||
/>
|
/>
|
||||||
<EditButton
|
<EditButton
|
||||||
v-if="!state.isEdit"
|
v-if="!state.isEdit"
|
||||||
id="btn-info-basic-edit"
|
:id="`btn-properties-${props.prefix || 'nome'}-info-basic-edit`"
|
||||||
icon-only
|
icon-only
|
||||||
@click.stop="triggerEdit"
|
@click.stop="triggerEdit"
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
|
|
@ -881,6 +881,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
:readonly="value._readonly"
|
:readonly="value._readonly"
|
||||||
ref="refDocumentExpansion"
|
ref="refDocumentExpansion"
|
||||||
:attributes="value.attributes"
|
:attributes="value.attributes"
|
||||||
|
:prefix="value.productService.product.name"
|
||||||
@change-status="
|
@change-status="
|
||||||
(opt) => {
|
(opt) => {
|
||||||
triggerChangeStatusFile({
|
triggerChangeStatusFile({
|
||||||
|
|
@ -928,6 +929,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
<MessengerExpansion
|
<MessengerExpansion
|
||||||
v-if="value._messengerExpansion"
|
v-if="value._messengerExpansion"
|
||||||
:readonly="value._readonly"
|
:readonly="value._readonly"
|
||||||
|
:prefix="value.productService.product.name"
|
||||||
:default-messenger="
|
:default-messenger="
|
||||||
value.stepStatus[pageState.currentStep - 1]
|
value.stepStatus[pageState.currentStep - 1]
|
||||||
? undefined
|
? undefined
|
||||||
|
|
@ -953,6 +955,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
<DutyExpansion
|
<DutyExpansion
|
||||||
v-if="value._dutyExpansion"
|
v-if="value._dutyExpansion"
|
||||||
:readonly="value._readonly"
|
:readonly="value._readonly"
|
||||||
|
:prefix="value.productService.product.name"
|
||||||
:step="{
|
:step="{
|
||||||
step: pageState.currentStep,
|
step: pageState.currentStep,
|
||||||
requestWorkId: value.id || '',
|
requestWorkId: value.id || '',
|
||||||
|
|
@ -966,6 +969,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
v-if="value._formExpansion"
|
v-if="value._formExpansion"
|
||||||
:request-work-id="value.id"
|
:request-work-id="value.id"
|
||||||
:readonly="value._readonly"
|
:readonly="value._readonly"
|
||||||
|
:prefix="value.productService.product.name"
|
||||||
:step="{
|
:step="{
|
||||||
step: pageState.currentStep,
|
step: pageState.currentStep,
|
||||||
requestWorkId: value.id || '',
|
requestWorkId: value.id || '',
|
||||||
|
|
@ -979,6 +983,7 @@ function toEmployee(employee: RequestData['employee']) {
|
||||||
:request-list-data="data"
|
:request-list-data="data"
|
||||||
:id="value.id"
|
:id="value.id"
|
||||||
:readonly="value._readonly"
|
:readonly="value._readonly"
|
||||||
|
:prefix="value.productService.product.name"
|
||||||
:properties-to-show="
|
:properties-to-show="
|
||||||
value.productService.work?.attributes.workflowStep[
|
value.productService.work?.attributes.workflowStep[
|
||||||
pageState.currentStep - 1
|
pageState.currentStep - 1
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,8 @@ function handleCheckAll() {
|
||||||
>
|
>
|
||||||
<q-th v-if="checkable">
|
<q-th v-if="checkable">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
|
:for="`list-checkbox-all`"
|
||||||
|
:id="`list-checkbox-all`"
|
||||||
v-if="selected.length > 0"
|
v-if="selected.length > 0"
|
||||||
:model-value="
|
:model-value="
|
||||||
selected.length ===
|
selected.length ===
|
||||||
|
|
@ -229,6 +231,8 @@ function handleCheckAll() {
|
||||||
>
|
>
|
||||||
<q-td v-if="checkable">
|
<q-td v-if="checkable">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
|
:for="`list-checkbox-${props.rowIndex + 1}`"
|
||||||
|
:id="`list-checkbox-${props.rowIndex + 1}`"
|
||||||
:disable="
|
:disable="
|
||||||
selected.length > 0 &&
|
selected.length > 0 &&
|
||||||
!listSameArea.includes(
|
!listSameArea.includes(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue