1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-12 22:29:59 +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 * Create a location and return the created entity
* @param {array} attributesList * @param {array} attributesList
*/ */
export function requestCreateLocationAddress({ export function createLocationAddress({
attributesList attributesList
}) { }) {
const { requestCreateEntity } = require('@/api/ADempiere/persistence.js') const { requestCreateEntity } = require('@/api/ADempiere/persistence.js')
@ -20,7 +20,7 @@ export function requestCreateLocationAddress({
* @param {number} id as C_Location_ID * @param {number} id as C_Location_ID
* @param {string} uuid * @param {string} uuid
*/ */
export function requestGetLocationAddress({ export function getLocationAddress({
id, id,
uuid uuid
}) { }) {
@ -39,7 +39,7 @@ export function requestGetLocationAddress({
* @param {string} uuid * @param {string} uuid
* @param {array} attributesList, all attributes (including empty values) * @param {array} attributesList, all attributes (including empty values)
*/ */
export function requestUpdateLocationAddress({ export function updateLocationAddress({
id, id,
uuid, uuid,
attributesList attributesList

View File

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

View File

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

View File

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