This commit is contained in:
2021-02-09 20:49:56 +00:00
parent c7452857be
commit 38b2344bb4
4 changed files with 42 additions and 32 deletions

View File

@@ -10,6 +10,8 @@ MISC ITEMS THAT CAME UP
## CLIENT MISC ITEMS
todo: ClientNote form link back to customer disappears on save of NEW record only (not update), should always be present
also on list disappears if go anywhere else and return to it (like column chooser)
todo: validation errors not expanded in errorbox,
for example saving a widget with same name results in proper display at name field but in error box says:
Validation error
@@ -56,9 +58,7 @@ todo: Attachments button should indicate attachments:
## SERVER MISC ITEMS
todo: PUTASYNC all biz objects CONCURRENCY ISSUE It's in need of tweaking: changes made to widgetbiz putasync method to replicate to all others
first of all it needs to return the putObject, not the dbObject otherwise the concurrency is outdated
secondly, it needs to check the concurrency token as a validation issue, the db doesn't do it, it doesn't care what it is
todo: many biz objects are not using new PUT methodology
Might be because new methodology assumes complete PUT object as a entire replacement not a partial update
some of these objects (User) do partial updates so....

View File

@@ -6,9 +6,17 @@
<v-form ref="form" v-if="formState.ready">
<v-row>
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<v-col cols="12" v-if="customername">
<v-btn @click="goToCustomer"> {{ customername }}</v-btn>
<v-col cols="12">
<gz-pick-list
readonly
v-model="obj.customerId"
:aya-type="ayaTypes().Customer"
:show-edit-icon="true"
:label="$ay.t('Customer')"
></gz-pick-list>
</v-col>
<v-col cols="12">
<v-textarea
v-model="obj.notes"
@@ -77,7 +85,6 @@ export default {
vm.rights = window.$gz.role.getRights(window.$gz.type.CustomerNote);
vm.formState.readOnly = !vm.rights.change;
window.$gz.eventBus.$on("menu-click", clickHandler);
this.customername = this.$route.params.customername;
//id 0 means create a new record don't load one
if (vm.$route.params.recordid != 0) {
//is there already an obj from a prior operation?
@@ -190,15 +197,6 @@ export default {
}
},
methods: {
goToCustomer() {
this.$router.push({
name: "customer-edit",
params: {
recordid: this.obj.customerId
}
});
},
canSave: function() {
return this.formState.valid && this.formState.dirty;
},

View File

@@ -2,20 +2,30 @@
<div>
<gz-report-selector ref="reportSelector"></gz-report-selector>
<gz-extensions
:ayaType="ayType"
:selectedItems="selectedItems"
:aya-type="ayType"
:selected-items="selectedItems"
ref="extensions"
>
</gz-extensions>
{{ customername }}
<v-row>
<v-col cols="12">
<gz-pick-list
readonly
v-model="customerId"
:aya-type="ayaTypes().Customer"
:show-edit-icon="true"
:label="$ay.t('Customer')"
></gz-pick-list>
</v-col>
</v-row>
<gz-data-table
ref="gzdatatable"
formKey="cust-customer-notes"
dataListKey="CustomerNoteDataList"
:showSelect="rights.read"
form-key="cust-customer-notes"
data-list-key="CustomerNoteDataList"
:show-select="rights.read"
:reload="reload"
:clientCriteria="clientCriteria"
v-on:selection-change="handleSelected"
:client-criteria="clientCriteria"
@selection-change="handleSelected"
data-cy="customerNotesTable"
>
</gz-data-table>
@@ -31,7 +41,7 @@
const FORM_KEY = "cust-customer-notes";
export default {
created() {
this.customername = this.$route.params.customername;
this.customerId = parseInt(this.$route.params.customerid);
//MIXED STATIC But with provided criteria FILTER
this.clientCriteria = this.customerId.toString();
@@ -45,7 +55,7 @@ export default {
data() {
return {
customerId: undefined,
customername: undefined,
// customername: undefined,
clientCriteria: undefined,
rights: window.$gz.role.defaultRightsObject(),
ayType: window.$gz.type.CustomerNote,
@@ -56,6 +66,9 @@ export default {
methods: {
handleSelected(selected) {
this.selectedItems = selected;
},
ayaTypes: function() {
return window.$gz.type;
}
}
};
@@ -75,8 +88,7 @@ async function clickHandler(menuItem) {
name: "customer-note-edit",
params: {
recordid: 0,
customerid: m.vm.customerId,
customername: m.vm.customername
customerid: m.vm.customerId
}
});
break;

View File

@@ -2,15 +2,15 @@
<div>
<gz-report-selector ref="reportSelector"></gz-report-selector>
<div v-if="formState.ready">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<gz-error :error-box-message="formState.errorBoxMessage"></gz-error>
<v-form ref="form">
<v-row>
<v-col cols="12">
<gz-pick-list
readonly
v-model="selectedPartId"
:ayaType="ayaTypes().Part"
:showEditIcon="true"
:aya-type="ayaTypes().Part"
:show-edit-icon="true"
:label="$ay.t('Part')"
ref="selectedPartId"
data-cy="selectedPartId"
@@ -19,8 +19,8 @@
<v-col cols="12">
<gz-pick-list
v-model="selectedPartWarehouseId"
:ayaType="ayaTypes().PartWarehouse"
:showEditIcon="true"
:aya-type="ayaTypes().PartWarehouse"
:show-edit-icon="true"
:label="$ay.t('PartSerialWarehouseID')"
ref="partWarehouseId"
data-cy="partWarehouseId"