This commit is contained in:
@@ -358,6 +358,11 @@
|
|||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
<div class="v-messages theme--light error--text mt-6" role="alert">
|
||||||
|
<div class="v-messages__wrapper">
|
||||||
|
<div class="v-messages__message">{{ allErrors }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -374,7 +379,8 @@ export default {
|
|||||||
dataCy: { type: String, default: null },
|
dataCy: { type: String, default: null },
|
||||||
formKey: { type: String, default: "" }, //used to grab template from store
|
formKey: { type: String, default: "" }, //used to grab template from store
|
||||||
readonly: Boolean,
|
readonly: Boolean,
|
||||||
disabled: Boolean
|
disabled: Boolean,
|
||||||
|
errorMessages: { type: Array, default: null }
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -393,6 +399,14 @@ export default {
|
|||||||
},
|
},
|
||||||
displayServiceAddress() {
|
displayServiceAddress() {
|
||||||
return formatAddress(this.value).physical;
|
return formatAddress(this.value).physical;
|
||||||
|
},
|
||||||
|
allErrors: function() {
|
||||||
|
let ret = "";
|
||||||
|
|
||||||
|
if (this.errorMessages != null && this.errorMessages.length > 0) {
|
||||||
|
ret += this.errorMessages.toString();
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
:readonly="formState.readOnly || value.userIsRestrictedType"
|
:readonly="formState.readOnly || value.userIsRestrictedType"
|
||||||
:pvm="pvm"
|
:pvm="pvm"
|
||||||
data-cy="woAddress"
|
data-cy="woAddress"
|
||||||
|
:error-messages="form().serverErrors(this, 'Address')"
|
||||||
/>
|
/>
|
||||||
</v-col>
|
</v-col>
|
||||||
|
|
||||||
|
|||||||
@@ -1,42 +1,57 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div class="mb-n2 ml-10">
|
||||||
<div class="mb-n2 ml-10">
|
<span class="text-caption">{{ $ay.t("WorkOrderStatus") }}</span>
|
||||||
<span class="text-caption">{{ $ay.t("WorkOrderStatus") }}</span>
|
</div>
|
||||||
</div>
|
<template>
|
||||||
<template>
|
<div
|
||||||
<div
|
class="mb-6 mb-sm-0"
|
||||||
class="mb-6 mb-sm-0"
|
:data-cy="`${dataCy}:open`"
|
||||||
:data-cy="`${dataCy}:open`"
|
@click="openDialog = true"
|
||||||
@click="openDialog = true"
|
>
|
||||||
>
|
<v-btn icon class="ml-n1 mr-2">
|
||||||
<v-btn icon class="ml-n1 mr-2">
|
<v-icon>{{ openIcon() }}</v-icon>
|
||||||
<v-icon>{{ openIcon() }}</v-icon>
|
</v-btn>
|
||||||
</v-btn>
|
|
||||||
|
|
||||||
<span class="text-h6">{{ pvm.currentState.name }}</span>
|
<span class="text-h6">{{ pvm.currentState.name }}</span>
|
||||||
<v-icon :color="pvm.currentState.color" class="ml-4">$ayiFlag</v-icon>
|
<v-icon :color="pvm.currentState.color" class="ml-4">$ayiFlag</v-icon>
|
||||||
<v-icon v-if="pvm.currentState.locked" color="primary" class="ml-4"
|
<v-icon v-if="pvm.currentState.locked" color="primary" class="ml-4"
|
||||||
>$ayiLock</v-icon
|
>$ayiLock</v-icon
|
||||||
>
|
>
|
||||||
<v-icon v-if="pvm.currentState.completed" color="primary" class="ml-4"
|
<v-icon v-if="pvm.currentState.completed" color="primary" class="ml-4"
|
||||||
>$ayiCheckCircle</v-icon
|
>$ayiCheckCircle</v-icon
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<v-row justify="center">
|
<v-row justify="center">
|
||||||
<v-dialog v-model="openDialog" max-width="600px">
|
<v-dialog v-model="openDialog" max-width="600px">
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>
|
<v-card-title>
|
||||||
<span class="text-h5">{{ $ay.t("WorkOrderStatus") }}</span>
|
<span class="text-h5">{{ $ay.t("WorkOrderStatus") }}</span>
|
||||||
</v-card-title>
|
</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<template v-if="$vuetify.breakpoint.smAndUp">
|
<template v-if="$vuetify.breakpoint.smAndUp">
|
||||||
<!-- WIDE VIEW -->
|
<!-- WIDE VIEW -->
|
||||||
<div v-for="item in stateDisplayList" :key="item.id">
|
<div v-for="item in stateDisplayList" :key="item.id">
|
||||||
<span>{{ item.timeStamp }}</span>
|
<span>{{ item.timeStamp }}</span>
|
||||||
<span class="ml-3">{{ item.user }}</span>
|
<span class="ml-3">{{ item.user }}</span>
|
||||||
<span class="font-weight-bold ml-3">{{ item.name }}</span>
|
<span class="font-weight-bold ml-3">{{ item.name }}</span>
|
||||||
|
<v-icon small :color="item.color" class="ml-4">$ayiFlag</v-icon>
|
||||||
|
<v-icon v-if="item.locked" small color="primary" class="ml-4"
|
||||||
|
>$ayiLock</v-icon
|
||||||
|
>
|
||||||
|
<v-icon v-if="item.completed" small color="primary" class="ml-4"
|
||||||
|
>$ayiCheckCircle</v-icon
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<!-- NARROW VIEW -->
|
||||||
|
<div v-for="item in stateDisplayList" :key="item.id">
|
||||||
|
<span>{{ item.timeStamp }} </span>
|
||||||
|
<span>{{ item.user }}</span>
|
||||||
|
<div class="mb-2">
|
||||||
|
<span class="font-weight-bold">{{ item.name }}</span>
|
||||||
<v-icon small :color="item.color" class="ml-4"
|
<v-icon small :color="item.color" class="ml-4"
|
||||||
>$ayiFlag</v-icon
|
>$ayiFlag</v-icon
|
||||||
>
|
>
|
||||||
@@ -51,103 +66,76 @@
|
|||||||
>$ayiCheckCircle</v-icon
|
>$ayiCheckCircle</v-icon
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</div>
|
||||||
<template v-else>
|
</template>
|
||||||
<!-- NARROW VIEW -->
|
<template v-if="canAdd">
|
||||||
<div v-for="item in stateDisplayList" :key="item.id">
|
<div class="mt-8">
|
||||||
<span>{{ item.timeStamp }} </span>
|
<v-autocomplete
|
||||||
<span>{{ item.user }}</span>
|
v-model="selectedStatus"
|
||||||
<div class="mb-2">
|
:items="pvm.selectLists.allowedwostatus"
|
||||||
<span class="font-weight-bold">{{ item.name }}</span>
|
item-text="name"
|
||||||
<v-icon small :color="item.color" class="ml-4"
|
item-value="id"
|
||||||
>$ayiFlag</v-icon
|
dense
|
||||||
>
|
:label="$ay.t('NewStatus')"
|
||||||
<v-icon
|
prepend-icon="$ayiEdit"
|
||||||
v-if="item.locked"
|
:data-cy="`${dataCy}:picker`"
|
||||||
small
|
@click:prepend="handleEditStateClick()"
|
||||||
color="primary"
|
>
|
||||||
class="ml-4"
|
<template v-slot:item="data">
|
||||||
>$ayiLock</v-icon
|
<v-list-item-avatar>
|
||||||
>
|
<v-icon :color="data.item.color">$ayiFlag</v-icon>
|
||||||
<v-icon
|
</v-list-item-avatar>
|
||||||
v-if="item.completed"
|
<v-list-item-content>
|
||||||
small
|
<v-list-item-title
|
||||||
color="primary"
|
><span class="text-subtitle-2">{{
|
||||||
class="ml-4"
|
data.item.name
|
||||||
>$ayiCheckCircle</v-icon
|
}}</span
|
||||||
>
|
><v-icon
|
||||||
</div>
|
v-if="data.item.locked"
|
||||||
</div>
|
small
|
||||||
</template>
|
color="disabled"
|
||||||
<template v-if="canAdd">
|
class="ml-2"
|
||||||
<div class="mt-8">
|
>$ayiLock</v-icon
|
||||||
<v-autocomplete
|
|
||||||
v-model="selectedStatus"
|
|
||||||
:items="pvm.selectLists.allowedwostatus"
|
|
||||||
item-text="name"
|
|
||||||
item-value="id"
|
|
||||||
dense
|
|
||||||
:label="$ay.t('NewStatus')"
|
|
||||||
prepend-icon="$ayiEdit"
|
|
||||||
:data-cy="`${dataCy}:picker`"
|
|
||||||
@click:prepend="handleEditStateClick()"
|
|
||||||
>
|
|
||||||
<template v-slot:item="data">
|
|
||||||
<v-list-item-avatar>
|
|
||||||
<v-icon :color="data.item.color">$ayiFlag</v-icon>
|
|
||||||
</v-list-item-avatar>
|
|
||||||
<v-list-item-content>
|
|
||||||
<v-list-item-title
|
|
||||||
><span class="text-subtitle-2">{{
|
|
||||||
data.item.name
|
|
||||||
}}</span
|
|
||||||
><v-icon
|
|
||||||
v-if="data.item.locked"
|
|
||||||
small
|
|
||||||
color="disabled"
|
|
||||||
class="ml-2"
|
|
||||||
>$ayiLock</v-icon
|
|
||||||
>
|
|
||||||
<v-icon
|
|
||||||
v-if="data.item.completed"
|
|
||||||
color="disabled"
|
|
||||||
class="ml-1"
|
|
||||||
small
|
|
||||||
>$ayiCheckCircle</v-icon
|
|
||||||
></v-list-item-title
|
|
||||||
>
|
>
|
||||||
|
<v-icon
|
||||||
|
v-if="data.item.completed"
|
||||||
|
color="disabled"
|
||||||
|
class="ml-1"
|
||||||
|
small
|
||||||
|
>$ayiCheckCircle</v-icon
|
||||||
|
></v-list-item-title
|
||||||
|
>
|
||||||
|
|
||||||
<v-list-item-subtitle>
|
<v-list-item-subtitle>
|
||||||
{{ data.item.notes }}</v-list-item-subtitle
|
{{ data.item.notes }}</v-list-item-subtitle
|
||||||
>
|
>
|
||||||
</v-list-item-content>
|
</v-list-item-content>
|
||||||
<v-list-item-action> </v-list-item-action>
|
<v-list-item-action> </v-list-item-action>
|
||||||
</template>
|
</template>
|
||||||
</v-autocomplete>
|
</v-autocomplete>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-btn color="blue darken-1" text @click="cancelDialog()">{{
|
<v-btn color="blue darken-1" text @click="cancelDialog()">{{
|
||||||
$ay.t("Cancel")
|
$ay.t("Cancel")
|
||||||
}}</v-btn>
|
}}</v-btn>
|
||||||
<v-btn
|
<v-btn
|
||||||
color="blue darken-1"
|
color="blue darken-1"
|
||||||
:disabled="selectedStatus == null"
|
:disabled="selectedStatus == null"
|
||||||
text
|
text
|
||||||
:data-cy="`${dataCy}:btnok`"
|
:data-cy="`${dataCy}:btnok`"
|
||||||
@click="save()"
|
@click="save()"
|
||||||
>{{ $ay.t("OK") }}</v-btn
|
>{{ $ay.t("OK") }}</v-btn
|
||||||
>
|
>
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
</v-row>
|
</v-row>
|
||||||
<div class="v-messages theme--light error--text mt-6" role="alert">
|
<div class="v-messages theme--light error--text mt-6" role="alert">
|
||||||
<div class="v-messages__wrapper">
|
<div class="v-messages__wrapper">
|
||||||
<div class="v-messages__message">{{ allErrors }}</div>
|
<div class="v-messages__message">{{ allErrors }}</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user