This commit is contained in:
@@ -23,8 +23,7 @@ FIRST CLIENT SOURCE CODE COMMIT JAN 3rd 2019
|
|||||||
# OUTSTANDING MAJOR AREAS TO BETA
|
# OUTSTANDING MAJOR AREAS TO BETA
|
||||||
|
|
||||||
|
|
||||||
Update dependencies before the next beta build
|
beta versioning for actual release, beta rc1?
|
||||||
beta versioning for actual release, beta rc1?
|
|
||||||
|
|
||||||
- BETA tester docs on what and how suggested to test?
|
- BETA tester docs on what and how suggested to test?
|
||||||
Joyce will make survey for this
|
Joyce will make survey for this
|
||||||
|
|||||||
@@ -130,7 +130,7 @@
|
|||||||
<v-card>
|
<v-card>
|
||||||
<v-card-title>{{ $ay.t("New") }}</v-card-title>
|
<v-card-title>{{ $ay.t("New") }}</v-card-title>
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<v-col cols="12">
|
<v-col v-if="canCreateWorkOrder" cols="12">
|
||||||
<v-btn
|
<v-btn
|
||||||
x-large
|
x-large
|
||||||
block
|
block
|
||||||
@@ -138,7 +138,7 @@
|
|||||||
><v-icon large left>$ayiTools</v-icon
|
><v-icon large left>$ayiTools</v-icon
|
||||||
>{{ $ay.t("WorkOrder") }}</v-btn
|
>{{ $ay.t("WorkOrder") }}</v-btn
|
||||||
> </v-col
|
> </v-col
|
||||||
><v-col cols="12">
|
><v-col v-if="canCreateReminder" cols="12">
|
||||||
<v-btn x-large block @click="newItem($ay.ayt().Reminder)"
|
<v-btn x-large block @click="newItem($ay.ayt().Reminder)"
|
||||||
><v-icon large left>$ayiStickyNote</v-icon
|
><v-icon large left>$ayiStickyNote</v-icon
|
||||||
>{{ $ay.t("Reminder") }}</v-btn
|
>{{ $ay.t("Reminder") }}</v-btn
|
||||||
@@ -496,6 +496,24 @@ export default {
|
|||||||
},
|
},
|
||||||
issmAndUp() {
|
issmAndUp() {
|
||||||
return this.$vuetify.breakpoint.smAndUp;
|
return this.$vuetify.breakpoint.smAndUp;
|
||||||
|
},
|
||||||
|
canCreateWorkOrder() {
|
||||||
|
if (
|
||||||
|
this.$store.getters.isScheduleableUser &&
|
||||||
|
!window.$gz.role.hasRole([
|
||||||
|
window.$gz.role.AUTHORIZATION_ROLES.TechRestricted
|
||||||
|
]) &&
|
||||||
|
!window.$gz.store.getters.isSubContractorUser
|
||||||
|
) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
canCreateReminder() {
|
||||||
|
if (!window.$gz.store.getters.isSubContractorUser) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
@@ -593,7 +611,8 @@ export default {
|
|||||||
//Handle the event, could be one of three things: changing an event start time, changing an event length or creating a new event
|
//Handle the event, could be one of three things: changing an event start time, changing an event length or creating a new event
|
||||||
if (this.extendEvent && this.extendEvent.type == 0) {
|
if (this.extendEvent && this.extendEvent.type == 0) {
|
||||||
//NEW, prompt for deets and create or if cancelled then just remove this faux event from events list (it will be the last one in the array)
|
//NEW, prompt for deets and create or if cancelled then just remove this faux event from events list (it will be the last one in the array)
|
||||||
this.newItemDialog = true;
|
if (this.canCreateWorkOrder || this.canCreateReminder)
|
||||||
|
this.newItemDialog = true;
|
||||||
} else {
|
} else {
|
||||||
//MORE INFO
|
//MORE INFO
|
||||||
if (this.lastMouseDownMS != null && this.itWasAClickNotADrag()) {
|
if (this.lastMouseDownMS != null && this.itWasAClickNotADrag()) {
|
||||||
@@ -636,11 +655,27 @@ export default {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
let allowedToDoThis = true;
|
||||||
|
//only users who could create the object are allowed to modify it
|
||||||
|
if (
|
||||||
|
param.type == window.$gz.type.WorkOrderItemScheduledUser &&
|
||||||
|
!this.canCreateWorkOrder
|
||||||
|
) {
|
||||||
|
allowedToDoThis = false;
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
param.type == window.$gz.type.Reminder &&
|
||||||
|
!this.canCreateReminder
|
||||||
|
) {
|
||||||
|
allowedToDoThis = false;
|
||||||
|
}
|
||||||
window.$gz.form.deleteAllErrorBoxErrors(this);
|
window.$gz.form.deleteAllErrorBoxErrors(this);
|
||||||
const res = await window.$gz.api.post("schedule/adjust", param);
|
if (allowedToDoThis) {
|
||||||
if (res.error) {
|
const res = await window.$gz.api.post("schedule/adjust", param);
|
||||||
this.formState.serverError = res.error;
|
if (res.error) {
|
||||||
window.$gz.form.setErrorBoxErrors(this);
|
this.formState.serverError = res.error;
|
||||||
|
window.$gz.form.setErrorBoxErrors(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
window.$gz.errorHandler.handleFormError(error, this);
|
window.$gz.errorHandler.handleFormError(error, this);
|
||||||
|
|||||||
Reference in New Issue
Block a user