1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-10 20:39:48 +08:00

Rename functions for location components (#683)

This commit is contained in:
Yamel Senih 2021-03-22 16:38:05 -04:00 committed by GitHub
parent 3e315de138
commit 99525aa05a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 11 deletions

View File

@ -4,7 +4,7 @@ const tableName = 'C_Location'
* Create a location and return the created entity
* @param {array} attributesList
*/
export function requestCreateLocationAddress({
export function createLocationAddress({
attributesList
}) {
const { requestCreateEntity } = require('@/api/ADempiere/persistence.js')
@ -20,7 +20,7 @@ export function requestCreateLocationAddress({
* @param {number} id as C_Location_ID
* @param {string} uuid
*/
export function requestGetLocationAddress({
export function getLocationAddress({
id,
uuid
}) {
@ -39,7 +39,7 @@ export function requestGetLocationAddress({
* @param {string} uuid
* @param {array} attributesList, all attributes (including empty values)
*/
export function requestUpdateLocationAddress({
export function updateLocationAddress({
id,
uuid,
attributesList

View File

@ -91,7 +91,7 @@ export default {
return
}
this.requestGetLocationAddress({
this.getLocationAddress({
id: value
})
.then(responseLocation => {

View File

@ -53,8 +53,8 @@ import formMixin from '@/components/ADempiere/Form/formMixin.js'
import mixinLocation from './mixinLocation.js'
import fieldsList from './fieldsList.js'
import {
requestCreateLocationAddress,
requestUpdateLocationAddress
createLocationAddress,
updateLocationAddress
} from '@/api/ADempiere/field/location.js'
import { showNotification } from '@/utils/ADempiere/notification.js'
import { getSequenceAsList } from '@/utils/ADempiere/location'
@ -289,7 +289,7 @@ export default {
}
if (this.isEmptyValue(locationId) || locationId === 0) {
requestCreateLocationAddress({
createLocationAddress({
attributesList: attributesToServer
})
.then(updateLocation)
@ -304,7 +304,7 @@ export default {
// break to only create
return
}
requestUpdateLocationAddress({
updateLocationAddress({
id: locationId,
attributesList: attributesToServer
})
@ -336,7 +336,7 @@ export default {
return
}
this.requestGetLocationAddress({
this.getLocationAddress({
id
})
.then(responseLocation => {

View File

@ -1,5 +1,5 @@
import { requestGetCountryDefinition } from '@/api/ADempiere/system-core.js'
import { requestGetLocationAddress } from '@/api/ADempiere/field/location.js'
import { getLocationAddress } from '@/api/ADempiere/field/location.js'
export default {
name: 'MixinLocationField',
@ -17,7 +17,7 @@ export default {
}
},
methods: {
requestGetLocationAddress,
getLocationAddress,
requestGetCountryDefinition,
toggleShowedLocationForm() {
this.$store.commit('setShowedLocation', !this.isShowedLocationForm)