mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-07 18:25:45 +08:00
Separate Services (#843)
* Separate Services - Dictionary: dictionary - Common request: common - ADempiere Generic API:common/api - Dashboard Content: dashboard - Dashboard favorites: dashboard/addons/user - Dashboard Pending Documents: dashboard/addons/tasks - User Management: user - User enrollment: user/enrollment - User Log: user/log - Workflow metadata: workflow - User Interface Common logic: user-interface/common - User Interface Window tools: user-interface/window - User Interface Smart Browser tools: user-interface/smart-browser - User Interface Process tools: user-interface/process - User Interface Attachment Management: user-interface/component/attachment - User Interface Components Preference: user-interface/component/preference - User Interface Components Private Access: user-interface/component/private-access - User Interface Components Record Access: user-interface/component/record-access - User Interface Components Notes: user-interface/component/notes - User Interface Components Translation: user-interface/component/translation - User Interface Forms / POS: form/addons/point-of-sales * Minor change * Remove persistence * Untrack files * Remove persistence * resolve conflicts * Update files
This commit is contained in:
parent
53ca1209c7
commit
ff4c1349e8
@ -5,11 +5,11 @@
|
||||
},
|
||||
"adempiere": {
|
||||
"api": {
|
||||
"url": "https://api.erpya.com/adempiere-api",
|
||||
"url": "https://api.erpya.com/api",
|
||||
"timeout": 10000
|
||||
},
|
||||
"images": {
|
||||
"url": "https://api.erpya.com/adempiere-api/img"
|
||||
"url": "https://api.erpya.com/adempiere-api"
|
||||
}
|
||||
},
|
||||
"repository": {
|
||||
|
@ -24,9 +24,9 @@ export function getPrivateAccess({
|
||||
recordUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/get-private-access',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user-interface/component/private-access/private-access',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid
|
||||
@ -48,7 +48,7 @@ export function lockPrivateAccess({
|
||||
recordUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/lock-private-access',
|
||||
url: '/user-interface/component/private-access/lock-private-access',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
@ -72,7 +72,7 @@ export function unlockPrivateAccess({
|
||||
recordUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/unlock-private-access',
|
||||
url: '/user-interface/component/private-access/unlock-private-access',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
|
@ -31,7 +31,7 @@ export function getRecordAccess({
|
||||
}) {
|
||||
return new Promise(resolve => {
|
||||
request({
|
||||
url: '/ui/record-access',
|
||||
url: '/user-interface/component/record-access/record-access',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
@ -59,7 +59,7 @@ export function setRecordAccess({
|
||||
recordAccesses
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/set-record-access',
|
||||
url: '/user-interface/component/record-access/set-record-access',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
|
59
src/api/ADempiere/actions/translation.js
Normal file
59
src/api/ADempiere/actions/translation.js
Normal file
@ -0,0 +1,59 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
/**
|
||||
* Request translations
|
||||
* @param {string} tableName
|
||||
* @param {string} language
|
||||
* @param {string} recordUuid
|
||||
* @param {number} recordId
|
||||
*/
|
||||
export function requestTranslations({
|
||||
tableName,
|
||||
language,
|
||||
recordUuid,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/user-interface/component/translation/translations',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
language,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(languageListResponse => {
|
||||
const { convertTranslation } = require('@/utils/ADempiere/apiConverts/persistence.js')
|
||||
|
||||
return {
|
||||
nextPageToken: languageListResponse.next_page_token,
|
||||
recordCount: languageListResponse.record_count,
|
||||
translationsList: languageListResponse.records.map(record => {
|
||||
return convertTranslation(record)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
@ -54,7 +54,7 @@ export function requestBrowserSearch({
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/ui/list-browser-items',
|
||||
url: '/user-interface/smart-browser/browser-items',
|
||||
data: {
|
||||
// Running Parameters
|
||||
uuid,
|
||||
|
@ -34,7 +34,7 @@ export function requestCreateEntity({
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/data/create',
|
||||
url: '/common/api/create',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
@ -69,7 +69,7 @@ export function requestUpdateEntity({
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/data/update',
|
||||
url: '/common/api/update',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
@ -97,7 +97,7 @@ export function requestDeleteEntity({
|
||||
recordUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/data/delete',
|
||||
url: '/common/api/delete',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
@ -122,7 +122,7 @@ export function rollbackEntity({
|
||||
eventType
|
||||
}) {
|
||||
return request({
|
||||
url: '/data/rollback-entity',
|
||||
url: '/common/api/rollback-entity',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
@ -145,7 +145,7 @@ export function requestGetEntity({
|
||||
recordUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/data/entity',
|
||||
url: '/common/api/entity',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
@ -193,9 +193,9 @@ export function requestListEntities({
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/data/list',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/common/api/entites',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
// DSL Query
|
||||
filters,
|
||||
@ -204,9 +204,7 @@ export function requestListEntities({
|
||||
query,
|
||||
where_clause: whereClause,
|
||||
order_by_clause: orderByClause,
|
||||
limit
|
||||
},
|
||||
params: {
|
||||
limit,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -218,99 +216,3 @@ export function requestListEntities({
|
||||
return convertEntityList(entitiesListResponse)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request translations
|
||||
* @param {string} tableName
|
||||
* @param {string} language
|
||||
* @param {string} recordUuid
|
||||
* @param {number} recordId
|
||||
*/
|
||||
export function getTranslations({
|
||||
tableName,
|
||||
language,
|
||||
recordUuid,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/list-translations',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid
|
||||
},
|
||||
params: {
|
||||
language,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(languageListResponse => {
|
||||
const { convertTranslation } = require('@/utils/ADempiere/apiConverts/persistence.js')
|
||||
|
||||
return {
|
||||
nextPageToken: languageListResponse.next_page_token,
|
||||
recordCount: languageListResponse.record_count,
|
||||
translationsList: languageListResponse.records.map(record => {
|
||||
return convertTranslation(record)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Download a resource from file name
|
||||
export function requestResource({ resourceUuid }, callBack = {
|
||||
onData: () => {},
|
||||
onStatus: () => {},
|
||||
onEnd: () => {}
|
||||
}) {
|
||||
const stream = request({
|
||||
url: '/resource',
|
||||
method: 'get',
|
||||
params: {
|
||||
resource_uuid: resourceUuid
|
||||
}
|
||||
})
|
||||
|
||||
stream.on('data', (response) => callBack.onData(response))
|
||||
stream.on('status', (status) => callBack.onStatus(status))
|
||||
stream.on('end', (end) => callBack.onEnd(end))
|
||||
|
||||
return stream
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image with uri request
|
||||
* @author EdwinBetanc0urt <EdwinBetanc0urt@oulook.com>
|
||||
* @author Elsio15 <elsiiosanches@gmail.com>
|
||||
* @param {string} file
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @param {string} operation fit, resize
|
||||
* @returns {promise} with array buffer in response
|
||||
*/
|
||||
export function requestImage({
|
||||
file,
|
||||
width,
|
||||
height,
|
||||
operation = 'fit'
|
||||
}) {
|
||||
const { getImagePath } = require('@/utils/ADempiere/resource.js')
|
||||
|
||||
const { urn } = getImagePath({
|
||||
file,
|
||||
width,
|
||||
height,
|
||||
operation
|
||||
})
|
||||
|
||||
return request({
|
||||
url: urn,
|
||||
method: 'get',
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
}
|
70
src/api/ADempiere/common/resource.js
Normal file
70
src/api/ADempiere/common/resource.js
Normal file
@ -0,0 +1,70 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
import { config } from '@/utils/ADempiere/config'
|
||||
|
||||
// Download a resource from file name
|
||||
export function requestResource({ resourceUuid }, callBack = {
|
||||
onData: () => {},
|
||||
onStatus: () => {},
|
||||
onEnd: () => {}
|
||||
}) {
|
||||
const stream = request({
|
||||
url: '/resource',
|
||||
method: 'get',
|
||||
params: {
|
||||
resource_uuid: resourceUuid
|
||||
}
|
||||
})
|
||||
|
||||
stream.on('data', (response) => callBack.onData(response))
|
||||
stream.on('status', (status) => callBack.onStatus(status))
|
||||
stream.on('end', (end) => callBack.onEnd(end))
|
||||
|
||||
return stream
|
||||
}
|
||||
|
||||
/**
|
||||
* Get image with uri request
|
||||
* @param {string} file
|
||||
* @param {number} width
|
||||
* @param {number} height
|
||||
* @param {string} operation fit, resize
|
||||
* @returns {promise} with array buffer in response
|
||||
*/
|
||||
export function requestImage({
|
||||
file,
|
||||
width,
|
||||
height,
|
||||
operation = 'fit'
|
||||
}) {
|
||||
const { getImagePath } = require('@/utils/ADempiere/resource.js')
|
||||
|
||||
const { urn } = getImagePath({
|
||||
file,
|
||||
width,
|
||||
height,
|
||||
operation
|
||||
})
|
||||
return request({
|
||||
url: urn,
|
||||
method: 'get',
|
||||
responseType: 'arraybuffer',
|
||||
baseURL: config.adempiere.images.url
|
||||
})
|
||||
}
|
@ -18,107 +18,6 @@
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
// Get Recent Items based on selection option
|
||||
export function requestListRecentItems({
|
||||
userUuid,
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/logs/list-recent-items',
|
||||
method: 'post',
|
||||
data: {
|
||||
user_uuid: userUuid,
|
||||
role_uuid: roleUuid,
|
||||
current_session: true
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(recentItmesReponse => {
|
||||
const { convertRecentItemsList } = require('@/utils/ADempiere/apiConverts/dashboard.js')
|
||||
|
||||
return convertRecentItemsList(recentItmesReponse)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Favorites List
|
||||
* @param {string} userUuid
|
||||
*/
|
||||
export function getFavoritesFromServer({
|
||||
userId,
|
||||
userUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/dashboard/list-favorites',
|
||||
method: 'post',
|
||||
data: {
|
||||
user_id: userId,
|
||||
user_uuid: userUuid
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(favoritesListReponse => {
|
||||
const { convertFavorite } = require('@/utils/ADempiere/apiConverts/dashboard.js')
|
||||
|
||||
return {
|
||||
recordCount: favoritesListReponse.record_count,
|
||||
favoritesList: favoritesListReponse.records.map(favorite => {
|
||||
return convertFavorite(favorite)
|
||||
}),
|
||||
nextPageToken: favoritesListReponse.next_page_token
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Get pending documents
|
||||
export function getPendingDocumentsFromServer({
|
||||
userId,
|
||||
userUuid,
|
||||
roleId,
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/dashboard/list-pending-documents',
|
||||
method: 'post',
|
||||
data: {
|
||||
user_id: userId,
|
||||
user_uuid: userUuid,
|
||||
role_id: roleId,
|
||||
role_uuid: roleUuid
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(pendingDocumentsListResponse => {
|
||||
const { convertPendingDocument } = require('@/utils/ADempiere/apiConverts/dashboard.js')
|
||||
|
||||
return {
|
||||
recordCount: pendingDocumentsListResponse.record_count,
|
||||
pendingDocumentsList: pendingDocumentsListResponse.records.map(pendingDocument => {
|
||||
return convertPendingDocument(pendingDocument)
|
||||
}),
|
||||
nextPageToken: pendingDocumentsListResponse.next_page_token
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// List all dashboard for role
|
||||
export function requestLisDashboards({
|
||||
roleId,
|
||||
@ -127,13 +26,11 @@ export function requestLisDashboards({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/dashboard/list-dashboards',
|
||||
method: 'post',
|
||||
data: {
|
||||
role_id: roleId,
|
||||
role_uuid: roleUuid
|
||||
},
|
||||
url: '/dashboard/dashboards',
|
||||
method: 'get',
|
||||
params: {
|
||||
role_id: roleId,
|
||||
role_uuid: roleUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
|
54
src/api/ADempiere/dashboard/tasks.js
Normal file
54
src/api/ADempiere/dashboard/tasks.js
Normal file
@ -0,0 +1,54 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// This file is for get all information for dashboard of ADempiere client,
|
||||
// please if you want to implement a custom dashboard create a new fielwith api definition
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
// Get pending documents
|
||||
export function getPendingDocumentsFromServer({
|
||||
userId,
|
||||
userUuid,
|
||||
roleId,
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/dashboard/addons/tasks/pending-documents',
|
||||
method: 'get',
|
||||
params: {
|
||||
user_id: userId,
|
||||
user_uuid: userUuid,
|
||||
role_id: roleId,
|
||||
role_uuid: roleUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(pendingDocumentsListResponse => {
|
||||
const { convertPendingDocument } = require('@/utils/ADempiere/apiConverts/dashboard.js')
|
||||
|
||||
return {
|
||||
recordCount: pendingDocumentsListResponse.record_count,
|
||||
pendingDocumentsList: pendingDocumentsListResponse.records.map(pendingDocument => {
|
||||
return convertPendingDocument(pendingDocument)
|
||||
}),
|
||||
nextPageToken: pendingDocumentsListResponse.next_page_token
|
||||
}
|
||||
})
|
||||
}
|
79
src/api/ADempiere/dashboard/user.js
Normal file
79
src/api/ADempiere/dashboard/user.js
Normal file
@ -0,0 +1,79 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
// This file is for get all information for dashboard of ADempiere client,
|
||||
// please if you want to implement a custom dashboard create a new fielwith api definition
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
// Get Recent Items based on selection option
|
||||
export function requestListRecentItems({
|
||||
userUuid,
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/dashboard/addons/user/recent-items',
|
||||
method: 'get',
|
||||
params: {
|
||||
user_uuid: userUuid,
|
||||
role_uuid: roleUuid,
|
||||
current_session: true,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(recentItmesReponse => {
|
||||
const { convertRecentItemsList } = require('@/utils/ADempiere/apiConverts/dashboard.js')
|
||||
|
||||
return convertRecentItemsList(recentItmesReponse)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Favorites List
|
||||
* @param {string} userUuid
|
||||
*/
|
||||
export function getFavoritesFromServer({
|
||||
userId,
|
||||
userUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/dashboard/addons/user/favorites',
|
||||
method: 'get',
|
||||
params: {
|
||||
user_id: userId,
|
||||
user_uuid: userUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(favoritesListReponse => {
|
||||
const { convertFavorite } = require('@/utils/ADempiere/apiConverts/dashboard.js')
|
||||
|
||||
return {
|
||||
recordCount: favoritesListReponse.record_count,
|
||||
favoritesList: favoritesListReponse.records.map(favorite => {
|
||||
return convertFavorite(favorite)
|
||||
}),
|
||||
nextPageToken: favoritesListReponse.next_page_token
|
||||
}
|
||||
})
|
||||
}
|
@ -18,45 +18,25 @@
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
/**
|
||||
* Run callout request
|
||||
* @param {string} windowUuid
|
||||
* @param {number} windowNo
|
||||
* @param {string} tabUuid
|
||||
* @param {string} tableName
|
||||
* @param {string} columnName
|
||||
* @param {mixed} value
|
||||
* @param {mixed} oldValue
|
||||
* @param {string} callout
|
||||
* @param {array} attributesList
|
||||
* @returns {Map} Entity
|
||||
* Request dictionary Form metadata
|
||||
* @param {string} uuid universally unique identifier
|
||||
* @param {number} id, integer identifier
|
||||
*/
|
||||
export function runCallOutRequest({
|
||||
windowUuid,
|
||||
windowNo,
|
||||
tabUuid,
|
||||
tableName,
|
||||
columnName,
|
||||
value,
|
||||
oldValue,
|
||||
callout,
|
||||
attributesList = []
|
||||
export function requestForm({
|
||||
uuid,
|
||||
id
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/run-callout',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
window_uuid: windowUuid,
|
||||
tab_uuid: tabUuid,
|
||||
callout,
|
||||
column_name: columnName,
|
||||
old_value: oldValue,
|
||||
value,
|
||||
window_no: windowNo,
|
||||
attributes: attributesList
|
||||
url: '/dictionary/form',
|
||||
method: 'get',
|
||||
params: {
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
return response
|
||||
.then(formResponse => {
|
||||
const { convertForm } = require('@/utils/ADempiere/apiConverts/dictionary.js')
|
||||
|
||||
return convertForm(formResponse)
|
||||
})
|
||||
}
|
42
src/api/ADempiere/dictionary/process.js
Normal file
42
src/api/ADempiere/dictionary/process.js
Normal file
@ -0,0 +1,42 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
/**
|
||||
* Request dictionary Process/Report metadata
|
||||
* @param {string} uuid universally unique identifier
|
||||
* @param {number} id, identifier
|
||||
*/
|
||||
export function requestProcessMetadata({
|
||||
uuid,
|
||||
id
|
||||
}) {
|
||||
return request({
|
||||
url: '/dictionary/process',
|
||||
method: 'get',
|
||||
params: {
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(processResponse => {
|
||||
const { convertProcess } = require('@/utils/ADempiere/apiConverts/dictionary.js')
|
||||
|
||||
return convertProcess(processResponse)
|
||||
})
|
||||
}
|
42
src/api/ADempiere/dictionary/smart-browser.js
Normal file
42
src/api/ADempiere/dictionary/smart-browser.js
Normal file
@ -0,0 +1,42 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
/**
|
||||
* Request dictionary Smart Browser metadata
|
||||
* @param {string} uuid universally unique identifier
|
||||
* @param {number} id, identifier
|
||||
*/
|
||||
export function requestBrowserMetadata({
|
||||
uuid,
|
||||
id
|
||||
}) {
|
||||
return request({
|
||||
url: '/dictionary/browser',
|
||||
method: 'get',
|
||||
params: {
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(browserResponse => {
|
||||
const { convertBrowser } = require('@/utils/ADempiere/apiConverts/dictionary.js')
|
||||
|
||||
return convertBrowser(browserResponse)
|
||||
})
|
||||
}
|
@ -41,78 +41,6 @@ export function requestWindowMetadata({
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request dictionary Process/Report metadata
|
||||
* @param {string} uuid universally unique identifier
|
||||
* @param {number} id, identifier
|
||||
*/
|
||||
export function requestProcessMetadata({
|
||||
uuid,
|
||||
id
|
||||
}) {
|
||||
return request({
|
||||
url: '/dictionary/process',
|
||||
method: 'get',
|
||||
params: {
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(processResponse => {
|
||||
const { convertProcess } = require('@/utils/ADempiere/apiConverts/dictionary.js')
|
||||
|
||||
return convertProcess(processResponse)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request dictionary Smart Browser metadata
|
||||
* @param {string} uuid universally unique identifier
|
||||
* @param {number} id, identifier
|
||||
*/
|
||||
export function requestBrowserMetadata({
|
||||
uuid,
|
||||
id
|
||||
}) {
|
||||
return request({
|
||||
url: '/dictionary/browser',
|
||||
method: 'get',
|
||||
params: {
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(browserResponse => {
|
||||
const { convertBrowser } = require('@/utils/ADempiere/apiConverts/dictionary.js')
|
||||
|
||||
return convertBrowser(browserResponse)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request dictionary Form metadata
|
||||
* @param {string} uuid universally unique identifier
|
||||
* @param {number} id, integer identifier
|
||||
*/
|
||||
export function requestForm({
|
||||
uuid,
|
||||
id
|
||||
}) {
|
||||
return request({
|
||||
url: '/dictionary/form',
|
||||
method: 'get',
|
||||
params: {
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(formResponse => {
|
||||
const { convertForm } = require('@/utils/ADempiere/apiConverts/dictionary.js')
|
||||
|
||||
return convertForm(formResponse)
|
||||
})
|
||||
}
|
||||
|
||||
export function requestFieldMetadata({
|
||||
uuid,
|
||||
columnUuid,
|
@ -33,7 +33,7 @@ export function requestEnrollUser({
|
||||
eMail
|
||||
}) {
|
||||
return request({
|
||||
url: '/enrollment/enroll',
|
||||
url: '/user/enrollment/enroll',
|
||||
data: {
|
||||
user_name: userName,
|
||||
name,
|
||||
@ -65,7 +65,7 @@ export function requestForgotPassword(eMailOrUserName) {
|
||||
}
|
||||
|
||||
return request({
|
||||
url: '/enrollment/reset-password',
|
||||
url: '/user/enrollment/reset-password',
|
||||
data: {
|
||||
user_name: userName,
|
||||
email: eMail,
|
||||
@ -91,7 +91,7 @@ export function requestChangePassword({
|
||||
password
|
||||
}) {
|
||||
return request({
|
||||
url: '/enrollment/change-password',
|
||||
url: '/user/enrollment/change-password',
|
||||
data: {
|
||||
token,
|
||||
password,
|
||||
@ -116,7 +116,7 @@ export function requestActivateUser({
|
||||
token
|
||||
}) {
|
||||
return request({
|
||||
url: '/enrollment/activate-user',
|
||||
url: '/user/enrollment/activate-user',
|
||||
data: {
|
||||
token,
|
||||
client_version: clientVersion,
|
||||
|
@ -23,7 +23,7 @@ export function getResource({
|
||||
uuid,
|
||||
tableName
|
||||
}) {
|
||||
const { requestGetEntity } = require('@/api/ADempiere/persistence.js')
|
||||
const { requestGetEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||
|
||||
return requestGetEntity({
|
||||
recordUuid: uuid,
|
||||
@ -42,7 +42,7 @@ export function updateResource({
|
||||
tableName,
|
||||
binaryFile
|
||||
}) {
|
||||
const { requestUpdateEntity } = require('@/api/ADempiere/persistence.js')
|
||||
const { requestUpdateEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||
|
||||
return requestUpdateEntity({
|
||||
recordUuid: uuid,
|
||||
|
@ -23,7 +23,7 @@ const tableName = 'C_Location'
|
||||
export function createLocationAddress({
|
||||
attributesList
|
||||
}) {
|
||||
const { requestCreateEntity } = require('@/api/ADempiere/persistence.js')
|
||||
const { requestCreateEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||
|
||||
return requestCreateEntity({
|
||||
tableName,
|
||||
@ -40,7 +40,7 @@ export function getLocationAddress({
|
||||
id,
|
||||
uuid
|
||||
}) {
|
||||
const { requestGetEntity } = require('@/api/ADempiere/persistence.js')
|
||||
const { requestGetEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||
|
||||
return requestGetEntity({
|
||||
tableName,
|
||||
@ -60,7 +60,7 @@ export function updateLocationAddress({
|
||||
uuid,
|
||||
attributesList
|
||||
}) {
|
||||
const { requestUpdateEntity } = require('@/api/ADempiere/persistence.js')
|
||||
const { requestUpdateEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||
|
||||
return requestUpdateEntity({
|
||||
tableName,
|
||||
|
@ -22,7 +22,7 @@ const tableName = 'M_Locator'
|
||||
export function getLocatorList({
|
||||
warehouseId
|
||||
}) {
|
||||
const { requestListEntities } = require('@/api/ADempiere/persistence.js')
|
||||
const { requestListEntities } = require('@/api/ADempiere/common/persistence.js')
|
||||
return new Promise(resolve => {
|
||||
requestListEntities({
|
||||
tableName,
|
||||
|
@ -30,7 +30,7 @@ export function setPreference({
|
||||
isForCurrentContainer
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/set-preference',
|
||||
url: '/user-interface/component/preference/set-preference',
|
||||
method: 'post',
|
||||
data: {
|
||||
container_uuid: parentUuid,
|
||||
@ -55,7 +55,7 @@ export function deletePreference({
|
||||
isForCurrentContainer
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/delete-preference',
|
||||
url: '/user-interface/component/preference/delete-preference',
|
||||
method: 'post',
|
||||
data: {
|
||||
container_uuid: parentUuid,
|
||||
|
@ -31,9 +31,9 @@ export function requestGetPointOfSales({
|
||||
posUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/get-point-of-sales',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/point-of-sales',
|
||||
method: 'get',
|
||||
params: {
|
||||
point_of_sales_uuid: posUuid
|
||||
}
|
||||
})
|
||||
@ -51,12 +51,10 @@ export function requestListPointOfSales({
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/list-point-of-sales',
|
||||
method: 'post',
|
||||
data: {
|
||||
user_uuid: userUuid
|
||||
},
|
||||
url: '/form/addons/point-of-sales/selling-points',
|
||||
method: 'get',
|
||||
params: {
|
||||
user_uuid: userUuid,
|
||||
page_size: pageSize,
|
||||
page_token: pageToken
|
||||
}
|
||||
@ -82,7 +80,7 @@ export function requestCreateOrder({
|
||||
salesRepresentativeUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/create-order',
|
||||
url: '/form/addons/point-of-sales/create-order',
|
||||
method: 'post',
|
||||
data: {
|
||||
pos_uuid: posUuid,
|
||||
@ -106,7 +104,7 @@ export function requestUpdateOrder({
|
||||
description
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/update-order',
|
||||
url: '/form/addons/point-of-sales/update-order',
|
||||
method: 'post',
|
||||
data: {
|
||||
order_uuid: orderUuid,
|
||||
@ -125,9 +123,9 @@ export function requestUpdateOrder({
|
||||
// Get order from uuid
|
||||
export function requestGetOrder(orderUuid) {
|
||||
return request({
|
||||
url: '/pos/get-order',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/order',
|
||||
method: 'get',
|
||||
params: {
|
||||
order_uuid: orderUuid
|
||||
}
|
||||
})
|
||||
@ -147,7 +145,7 @@ export function requestDeleteOrder({
|
||||
// salesRepresentativeUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/delete-order',
|
||||
url: '/form/addons/point-of-sales/delete-order',
|
||||
method: 'post',
|
||||
data: {
|
||||
order_uuid: orderUuid
|
||||
@ -222,9 +220,9 @@ export function requestListOrders({
|
||||
*/
|
||||
|
||||
return request({
|
||||
url: '/pos/list-orders',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/orders',
|
||||
method: 'get',
|
||||
params: {
|
||||
pos_uuid: posUuid,
|
||||
document_no: documentNo,
|
||||
business_partner_uuid: businessPartnerUuid,
|
||||
@ -234,11 +232,7 @@ export function requestListOrders({
|
||||
is_paid: isPaid,
|
||||
is_processed: isProcessed,
|
||||
is_aisle_seller: isAisleSeller,
|
||||
is_invoiced: isInvoiced
|
||||
// date_ordered_from: dateOrderedFrom,
|
||||
// date_ordered_to: dateOrderedTo
|
||||
},
|
||||
params: {
|
||||
is_invoiced: isInvoiced,
|
||||
page_size: pageSize,
|
||||
page_token: pageToken
|
||||
}
|
||||
@ -268,9 +262,9 @@ export function requestCreateOrderLine({
|
||||
discountRate
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/create-order-line',
|
||||
url: '/form/addons/point-of-sales/create-order-line',
|
||||
method: 'post',
|
||||
data: {
|
||||
params: {
|
||||
order_uuid: orderUuid,
|
||||
product_uuid: productUuid,
|
||||
description,
|
||||
@ -297,7 +291,7 @@ export function requestUpdateOrderLine({
|
||||
discountRate
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/update-order-line',
|
||||
url: '/form/addons/point-of-sales/update-order-line',
|
||||
method: 'post',
|
||||
data: {
|
||||
// is_add_quantity: true,
|
||||
@ -320,7 +314,7 @@ export function requestDeleteOrderLine({
|
||||
orderLineUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/delete-order-line',
|
||||
url: '/form/addons/point-of-sales/delete-order-line',
|
||||
method: 'post',
|
||||
data: {
|
||||
order_line_uuid: orderLineUuid
|
||||
@ -337,12 +331,10 @@ export function requestListOrderLines({
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/list-order-lines',
|
||||
method: 'post',
|
||||
data: {
|
||||
order_uuid: orderUuid
|
||||
},
|
||||
url: '/form/addons/point-of-sales/order-lines',
|
||||
method: 'get',
|
||||
params: {
|
||||
order_uuid: orderUuid,
|
||||
page_size: pageSize,
|
||||
page_token: pageToken
|
||||
}
|
||||
@ -362,9 +354,9 @@ export function requestListOrderLines({
|
||||
|
||||
export function getKeyLayout({ keyLayoutUuid }) {
|
||||
return request({
|
||||
url: '/pos/get-key-layout',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/key-layout',
|
||||
method: 'get',
|
||||
params: {
|
||||
key_layout_uuid: keyLayoutUuid
|
||||
}
|
||||
})
|
||||
@ -388,16 +380,14 @@ export function getProductPriceList({
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/list-product-prices',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/product-prices',
|
||||
method: 'get',
|
||||
params: {
|
||||
price_list_uuid: priceListUuid,
|
||||
search_value: searchValue,
|
||||
valid_from: validFrom,
|
||||
business_partner_uuid: businessPartnerUuid,
|
||||
warehouse_uuid: warehouseUuid
|
||||
},
|
||||
params: {
|
||||
warehouse_uuid: warehouseUuid,
|
||||
page_size: pageSize,
|
||||
page_token: pageToken
|
||||
}
|
||||
@ -475,7 +465,7 @@ export function createPayment({
|
||||
currencyUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/create-payment',
|
||||
url: '/form/addons/point-of-sales/create-payment',
|
||||
method: 'post',
|
||||
data: {
|
||||
pos_uuid: posUuid,
|
||||
@ -507,7 +497,7 @@ export function updatePayment({
|
||||
tenderTypeCode
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/update-payment',
|
||||
url: '/form/addons/point-of-sales/update-payment',
|
||||
method: 'post',
|
||||
data: {
|
||||
payment_uuid: paymentUuid,
|
||||
@ -530,7 +520,7 @@ export function deletePayment({
|
||||
paymentUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/delete-payment',
|
||||
url: '/form/addons/point-of-sales/delete-payment',
|
||||
method: 'post',
|
||||
data: {
|
||||
payment_uuid: paymentUuid
|
||||
@ -548,9 +538,9 @@ export function getPaymentsList({
|
||||
orderUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/list-payments',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/payments',
|
||||
method: 'get',
|
||||
params: {
|
||||
pos_uuid: posUuid,
|
||||
order_uuid: orderUuid
|
||||
}
|
||||
@ -609,7 +599,7 @@ export function processOrder({
|
||||
})
|
||||
}
|
||||
return request({
|
||||
url: '/pos/process-order',
|
||||
url: '/form/addons/point-of-sales/process-order',
|
||||
method: 'post',
|
||||
data: {
|
||||
pos_uuid: posUuid,
|
||||
|
@ -29,9 +29,9 @@ export function requestGetProductPrice({
|
||||
validFrom
|
||||
}) {
|
||||
return request({
|
||||
url: '/pos/get-product-price',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/form/addons/point-of-sales/get-product-price',
|
||||
method: 'get',
|
||||
params: {
|
||||
search_value: searchValue,
|
||||
upc,
|
||||
value,
|
||||
|
@ -57,7 +57,7 @@ export function requestRunProcess({
|
||||
})
|
||||
|
||||
return request({
|
||||
url: '/data/process',
|
||||
url: '/common/api/process',
|
||||
method: 'post',
|
||||
data: {
|
||||
process_uuid: uuid,
|
||||
@ -92,16 +92,14 @@ export function requestListProcessesLogs({
|
||||
}) {
|
||||
// Get Process Activity
|
||||
return request({
|
||||
url: '/logs/list-process-logs',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user/log/process-logs',
|
||||
method: 'get',
|
||||
params: {
|
||||
instance_uuid: instanceUuid,
|
||||
user_uuid: userUuid,
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid
|
||||
},
|
||||
params: {
|
||||
uuid: recordUuid,
|
||||
page_size: pageSize,
|
||||
page_token: pageToken
|
||||
}
|
||||
|
@ -29,13 +29,11 @@ export function requestListReportsViews({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/list-report-views',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
process_uuid: processUuid
|
||||
},
|
||||
url: '/user-interface/process/report-views',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
process_uuid: processUuid,
|
||||
page_token: pageToken,
|
||||
page_size: pageSize
|
||||
}
|
||||
@ -62,14 +60,12 @@ export function requestListPrintFormats({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/list-print-formats',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user-interface/process/print-formats',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
report_view_uuid: reportViewUuid,
|
||||
process_uuid: processUuid
|
||||
},
|
||||
params: {
|
||||
process_uuid: processUuid,
|
||||
page_token: pageToken,
|
||||
page_size: pageSize
|
||||
}
|
||||
@ -88,12 +84,10 @@ export function requestListDrillTables({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/list-drill-tables',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName
|
||||
},
|
||||
url: '/user-interface/process/drill-tables',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
page_token: pageToken,
|
||||
page_size: pageSize
|
||||
}
|
||||
@ -126,9 +120,9 @@ export function requestGetReportOutput({
|
||||
orderByClause
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/get-report-output',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user-interface/process/report-output',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
// reference
|
||||
print_format_uuid: printFormatUuid,
|
||||
|
@ -25,13 +25,11 @@ export function requestOrganizationsList({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/list-organizations',
|
||||
method: 'post',
|
||||
data: {
|
||||
role_id: roleId,
|
||||
role_uuid: roleUuid
|
||||
},
|
||||
url: '/common/organizations',
|
||||
method: 'get',
|
||||
params: {
|
||||
role_id: roleId,
|
||||
role_uuid: roleUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -58,13 +56,11 @@ export function requestWarehousesList({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/list-warehouses',
|
||||
method: 'post',
|
||||
data: {
|
||||
organization_id: organizationId,
|
||||
organization_uuid: organizationUuid
|
||||
},
|
||||
url: '/common/warehouses',
|
||||
method: 'get',
|
||||
params: {
|
||||
organization_id: organizationId,
|
||||
organization_uuid: organizationUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -89,7 +85,7 @@ export function requestGetCountryDefinition({
|
||||
uuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/country',
|
||||
url: '/common/country',
|
||||
method: 'get',
|
||||
params: {
|
||||
id,
|
||||
@ -109,8 +105,8 @@ export function requestLanguagesList({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/list-languages',
|
||||
method: 'post',
|
||||
url: '/common/languages',
|
||||
method: 'get',
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
@ -156,7 +152,7 @@ export function requestCreateBusinessPartner({
|
||||
posUuid
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/create-business-partner',
|
||||
url: '/common/create-business-partner',
|
||||
method: 'post',
|
||||
data: {
|
||||
value,
|
||||
@ -195,7 +191,7 @@ export function requestGetBusinessPartner({
|
||||
searchValue
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/get-business-partner',
|
||||
url: '/common/business-partner',
|
||||
method: 'get',
|
||||
params: {
|
||||
search_value: searchValue
|
||||
@ -222,9 +218,9 @@ export function requestListBusinessPartner({
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/list-business-partner',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/common/business-partners',
|
||||
method: 'get',
|
||||
params: {
|
||||
search_value: searchValue,
|
||||
value,
|
||||
name,
|
||||
@ -232,9 +228,7 @@ export function requestListBusinessPartner({
|
||||
e_mail: eMail,
|
||||
phone,
|
||||
// Location
|
||||
postal_code: postalCode
|
||||
},
|
||||
params: {
|
||||
postal_code: postalCode,
|
||||
page_size: pageSize,
|
||||
page_token: pageToken
|
||||
}
|
||||
@ -267,9 +261,9 @@ export function requestGetConversionRate({
|
||||
conversionDate
|
||||
}) {
|
||||
return request({
|
||||
url: '/core/get-conversion-rate',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/common/conversion-rate',
|
||||
method: 'get',
|
||||
params: {
|
||||
conversion_type_uuid: conversionTypeUuid,
|
||||
currency_from_uuid: currencyFromUuid,
|
||||
currency_to_uuid: currencyToUuid,
|
||||
|
@ -1,182 +0,0 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||
|
||||
/**
|
||||
* Request a Lookup data from Reference
|
||||
* The main attributes that function hope are:
|
||||
* @param {string} tableName
|
||||
* @param {string} directQuery
|
||||
* @param {string|number} value
|
||||
*/
|
||||
export function requestLookup({
|
||||
tableName,
|
||||
directQuery,
|
||||
value
|
||||
}) {
|
||||
let filters = []
|
||||
if (!isEmptyValue(value)) {
|
||||
filters = [{
|
||||
value
|
||||
}]
|
||||
}
|
||||
return request({
|
||||
url: '/ui/get-lookup-item',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
query: directQuery,
|
||||
filters
|
||||
}
|
||||
})
|
||||
.then(respose => {
|
||||
return respose
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a Lookup list data from Reference
|
||||
* The main attributes that function hope are:
|
||||
* @param {string} tableName
|
||||
* @param {string} query
|
||||
* @param {string} whereClause
|
||||
* @param {array} valuesList // TODO: Add support
|
||||
* @param {string} pageToken
|
||||
* @param {number} pageSize
|
||||
*/
|
||||
export function requestLookupList({
|
||||
tableName,
|
||||
query,
|
||||
whereClause,
|
||||
columnName,
|
||||
valuesList = [],
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
let filters = []
|
||||
if (!isEmptyValue(valuesList)) {
|
||||
filters = [{
|
||||
column_name: columnName,
|
||||
values: valuesList
|
||||
}]
|
||||
}
|
||||
|
||||
return request({
|
||||
url: '/ui/list-lookup-items',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
query,
|
||||
where_clause: whereClause,
|
||||
filters
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(lookupListResponse => {
|
||||
return {
|
||||
nextPageToken: lookupListResponse.next_page_token,
|
||||
recordCount: lookupListResponse.record_count,
|
||||
recordsList: lookupListResponse.records
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Reference List from Window
|
||||
* @param {string} tableName
|
||||
* @param {string} windowUuid
|
||||
* @param {string} recordUuid
|
||||
* @param {number} recordId
|
||||
*/
|
||||
export function requestReferencesList({
|
||||
windowUuid,
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/list-references',
|
||||
method: 'post',
|
||||
data: {
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
window_uuid: windowUuid,
|
||||
table_name: tableName
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(referencesListResposnse => {
|
||||
const { convertReferencesList } = require('@/utils/ADempiere/apiConverts/values.js')
|
||||
|
||||
return convertReferencesList(referencesListResposnse)
|
||||
})
|
||||
}
|
||||
|
||||
// Get default value for a field
|
||||
export function requestDefaultValue(query) {
|
||||
return request({
|
||||
url: '/ui/get-default-value',
|
||||
method: 'post',
|
||||
data: {
|
||||
query
|
||||
}
|
||||
})
|
||||
.then(respose => {
|
||||
return respose
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get context information for a window, tab or field
|
||||
* @param {string} query
|
||||
* @param {string} uuid
|
||||
* @param {number} id
|
||||
*/
|
||||
export function requestGetContextInfoValue({
|
||||
uuid,
|
||||
id,
|
||||
query
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/get-context-info-value',
|
||||
method: 'post',
|
||||
data: {
|
||||
query,
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(contextInfoValueResponse => {
|
||||
return {
|
||||
messageText: contextInfoValueResponse.message_text,
|
||||
messageTip: contextInfoValueResponse.message_tip
|
||||
}
|
||||
})
|
||||
}
|
@ -17,6 +17,210 @@
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||
|
||||
/**
|
||||
* Request a Lookup data from Reference
|
||||
* The main attributes that function hope are:
|
||||
* @param {string} tableName
|
||||
* @param {string} directQuery
|
||||
* @param {string|number} value
|
||||
*/
|
||||
export function requestLookup({
|
||||
tableName,
|
||||
directQuery,
|
||||
value
|
||||
}) {
|
||||
let filters = []
|
||||
if (!isEmptyValue(value)) {
|
||||
filters = [{
|
||||
value
|
||||
}]
|
||||
}
|
||||
return request({
|
||||
url: '/user-interface/window/lookup-item',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
query: directQuery,
|
||||
filters
|
||||
}
|
||||
})
|
||||
.then(respose => {
|
||||
return respose
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a Lookup list data from Reference
|
||||
* The main attributes that function hope are:
|
||||
* @param {string} tableName
|
||||
* @param {string} query
|
||||
* @param {string} whereClause
|
||||
* @param {array} valuesList // TODO: Add support
|
||||
* @param {string} pageToken
|
||||
* @param {number} pageSize
|
||||
*/
|
||||
export function requestLookupList({
|
||||
tableName,
|
||||
query,
|
||||
whereClause,
|
||||
columnName,
|
||||
valuesList = [],
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
let filters = []
|
||||
if (!isEmptyValue(valuesList)) {
|
||||
filters = [{
|
||||
column_name: columnName,
|
||||
values: valuesList
|
||||
}]
|
||||
}
|
||||
|
||||
return request({
|
||||
url: '/user-interface/window/lookup-items',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
query,
|
||||
where_clause: whereClause,
|
||||
filters,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(lookupListResponse => {
|
||||
return {
|
||||
nextPageToken: lookupListResponse.next_page_token,
|
||||
recordCount: lookupListResponse.record_count,
|
||||
recordsList: lookupListResponse.records
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Reference List from Window
|
||||
* @param {string} tableName
|
||||
* @param {string} windowUuid
|
||||
* @param {string} recordUuid
|
||||
* @param {number} recordId
|
||||
*/
|
||||
export function requestReferencesList({
|
||||
windowUuid,
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/user-interface/window/references',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
window_uuid: windowUuid,
|
||||
table_name: tableName,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(referencesListResposnse => {
|
||||
const { convertReferencesList } = require('@/utils/ADempiere/apiConverts/values.js')
|
||||
|
||||
return convertReferencesList(referencesListResposnse)
|
||||
})
|
||||
}
|
||||
|
||||
// Get default value for a field
|
||||
export function requestDefaultValue(query) {
|
||||
return request({
|
||||
url: '/user-interface/window/default-value',
|
||||
method: 'get',
|
||||
params: {
|
||||
query
|
||||
}
|
||||
})
|
||||
.then(respose => {
|
||||
return respose
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get context information for a window, tab or field
|
||||
* @param {string} query
|
||||
* @param {string} uuid
|
||||
* @param {number} id
|
||||
*/
|
||||
export function requestGetContextInfoValue({
|
||||
uuid,
|
||||
id,
|
||||
query
|
||||
}) {
|
||||
return request({
|
||||
url: '/user-interface/window/context-info-value',
|
||||
method: 'get',
|
||||
params: {
|
||||
query,
|
||||
uuid,
|
||||
id
|
||||
}
|
||||
})
|
||||
.then(contextInfoValueResponse => {
|
||||
return {
|
||||
messageText: contextInfoValueResponse.message_text,
|
||||
messageTip: contextInfoValueResponse.message_tip
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Run callout request
|
||||
* @param {string} windowUuid
|
||||
* @param {number} windowNo
|
||||
* @param {string} tabUuid
|
||||
* @param {string} tableName
|
||||
* @param {string} columnName
|
||||
* @param {mixed} value
|
||||
* @param {mixed} oldValue
|
||||
* @param {string} callout
|
||||
* @param {array} attributesList
|
||||
* @returns {Map} Entity
|
||||
*/
|
||||
export function runCallOutRequest({
|
||||
windowUuid,
|
||||
windowNo,
|
||||
tabUuid,
|
||||
tableName,
|
||||
columnName,
|
||||
value,
|
||||
oldValue,
|
||||
callout,
|
||||
attributesList = []
|
||||
}) {
|
||||
return request({
|
||||
url: '/user-interface/window/run-callout',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
window_uuid: windowUuid,
|
||||
tab_uuid: tabUuid,
|
||||
callout,
|
||||
column_name: columnName,
|
||||
old_value: oldValue,
|
||||
value,
|
||||
window_no: windowNo,
|
||||
attributes: attributesList
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
return response
|
||||
})
|
||||
}
|
||||
|
||||
// Get list of log for a records
|
||||
export function requestListEntityLogs({
|
||||
tableName,
|
||||
@ -26,14 +230,12 @@ export function requestListEntityLogs({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/logs/list-entity-logs',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user/log/entity-logs',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid
|
||||
},
|
||||
params: {
|
||||
uuid: recordUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -61,14 +263,12 @@ export function requestListWorkflowsLogs({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/logs/list-workflow-logs',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user/log/workflow-logs',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid
|
||||
},
|
||||
params: {
|
||||
uuid: recordUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -94,12 +294,10 @@ export function requestListWorkflows({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/workflow/list-workflow',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName
|
||||
},
|
||||
url: '/user/log/workflow-logs',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -132,14 +330,12 @@ export function requestListEntityChats({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/logs/list-entity-chats',
|
||||
method: 'post',
|
||||
data: {
|
||||
url: '/user/log/entity-chats',
|
||||
method: 'get',
|
||||
params: {
|
||||
table_name: tableName,
|
||||
id: recordId,
|
||||
uuid: recordUuid
|
||||
},
|
||||
params: {
|
||||
uuid: recordUuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -170,13 +366,11 @@ export function requestListChatsEntries({
|
||||
pageSize
|
||||
}) {
|
||||
return request({
|
||||
url: '/logs/list-chat-entries',
|
||||
method: 'post',
|
||||
data: {
|
||||
id,
|
||||
uuid
|
||||
},
|
||||
url: '/user/log/chat-entries',
|
||||
method: 'get',
|
||||
params: {
|
||||
id,
|
||||
uuid,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
@ -208,7 +402,7 @@ export function requestCreateChatEntry({
|
||||
comment
|
||||
}) {
|
||||
return request({
|
||||
url: '/ui/create-chat-entry',
|
||||
url: '/user-interface/component/notes/create-chat-entry',
|
||||
method: 'post',
|
||||
data: {
|
||||
table_name: tableName,
|
||||
@ -223,83 +417,3 @@ export function requestCreateChatEntry({
|
||||
return convertChatEntry(chatEntryResponse)
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Document Status List
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
* @param {string} documentStatus
|
||||
* @param {string} documentAction
|
||||
* @param {number} pageSize
|
||||
* @param {string} pageToken
|
||||
*/
|
||||
export function requestListDocumentStatuses({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
pageSize,
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/workflow/list-document-statuses',
|
||||
method: 'post',
|
||||
data: {
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
table_name: tableName,
|
||||
document_status: documentStatus
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(listDocumentsActionsResponse => {
|
||||
return {
|
||||
nextPageToken: listDocumentsActionsResponse.next_page_token,
|
||||
recordCount: listDocumentsActionsResponse.record_count,
|
||||
documentStatusesList: listDocumentsActionsResponse.records
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Request a document action list from current status of document
|
||||
export function requestListDocumentActions({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
documentAction,
|
||||
pageSize,
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/workflow/list-document-actions',
|
||||
method: 'post',
|
||||
data: {
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
table_name: tableName,
|
||||
document_action: documentAction,
|
||||
document_status: documentStatus
|
||||
},
|
||||
params: {
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(listDocumentsActionsResponse => {
|
||||
return {
|
||||
nextPageToken: listDocumentsActionsResponse.next_page_token,
|
||||
recordCount: listDocumentsActionsResponse.record_count,
|
||||
defaultDocumentAction: {
|
||||
...listDocumentsActionsResponse.default_document_action
|
||||
},
|
||||
documentActionsList: listDocumentsActionsResponse.records
|
||||
}
|
||||
})
|
||||
}
|
||||
|
94
src/api/ADempiere/workflow.js
Normal file
94
src/api/ADempiere/workflow.js
Normal file
@ -0,0 +1,94 @@
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
// Get Instance for connection
|
||||
import { request } from '@/utils/ADempiere/request'
|
||||
|
||||
/**
|
||||
* Request Document Status List
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
* @param {string} documentStatus
|
||||
* @param {string} documentAction
|
||||
* @param {number} pageSize
|
||||
* @param {string} pageToken
|
||||
*/
|
||||
export function requestListDocumentStatuses({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
pageSize,
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/workflow/document-statuses',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
table_name: tableName,
|
||||
document_status: documentStatus,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(listDocumentsActionsResponse => {
|
||||
return {
|
||||
nextPageToken: listDocumentsActionsResponse.next_page_token,
|
||||
recordCount: listDocumentsActionsResponse.record_count,
|
||||
documentStatusesList: listDocumentsActionsResponse.records
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Request a document action list from current status of document
|
||||
export function requestListDocumentActions({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
documentAction,
|
||||
pageSize,
|
||||
pageToken
|
||||
}) {
|
||||
return request({
|
||||
url: '/workflow/document-actions',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: recordId,
|
||||
uuid: recordUuid,
|
||||
table_name: tableName,
|
||||
document_action: documentAction,
|
||||
document_status: documentStatus,
|
||||
// Page Data
|
||||
pageToken,
|
||||
pageSize
|
||||
}
|
||||
})
|
||||
.then(listDocumentsActionsResponse => {
|
||||
return {
|
||||
nextPageToken: listDocumentsActionsResponse.next_page_token,
|
||||
recordCount: listDocumentsActionsResponse.record_count,
|
||||
defaultDocumentAction: {
|
||||
...listDocumentsActionsResponse.default_document_action
|
||||
},
|
||||
documentActionsList: listDocumentsActionsResponse.records
|
||||
}
|
||||
})
|
||||
}
|
@ -44,7 +44,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPendingDocumentsFromServer } from '@/api/ADempiere/dashboard/dashboard'
|
||||
import { getPendingDocumentsFromServer } from '@/api/ADempiere/dashboard/tasks'
|
||||
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
||||
|
||||
export default {
|
||||
|
@ -52,7 +52,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { requestListRecentItems } from '@/api/ADempiere/dashboard/dashboard'
|
||||
import { requestListRecentItems } from '@/api/ADempiere/dashboard/user'
|
||||
import { convertAction } from '@/utils/ADempiere/dictionaryUtils'
|
||||
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getFavoritesFromServer } from '@/api/ADempiere/dashboard/dashboard.js'
|
||||
import { getFavoritesFromServer } from '@/api/ADempiere/dashboard/user.js'
|
||||
import { convertAction } from '@/utils/ADempiere/dictionaryUtils.js'
|
||||
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
||||
|
||||
|
@ -95,7 +95,7 @@ import fieldsList from './fieldsListBarCode.js'
|
||||
// import { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
||||
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
||||
import { requestImage } from '@/api/ADempiere/persistence.js'
|
||||
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
||||
|
||||
export default {
|
||||
name: 'BarcodeReader',
|
||||
|
@ -106,7 +106,7 @@ import fieldsList from './fieldsList.js'
|
||||
import { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
||||
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
||||
import { requestImage } from '@/api/ADempiere/persistence.js'
|
||||
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
||||
|
||||
export default {
|
||||
name: 'PriceChecking',
|
||||
|
@ -102,7 +102,7 @@
|
||||
|
||||
<script>
|
||||
import VueContentLoading from '@/components/ADempiere/ContentLoader'
|
||||
import { requestImage } from '@/api/ADempiere/persistence.js'
|
||||
import { requestImage } from '@/api/ADempiere/common/resource.js'
|
||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
||||
import { formatQuantity } from '@/utils/ADempiere/valueFormat.js'
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { requestBrowserMetadata } from '@/api/ADempiere/dictionary.js'
|
||||
import { requestBrowserMetadata } from '@/api/ADempiere/dictionary/smart-browser.js'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { generateField } from '@/utils/ADempiere/dictionaryUtils'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { runCallOutRequest } from '@/api/ADempiere/rule'
|
||||
import { runCallOutRequest } from '@/api/ADempiere/window'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import language from '@/lang'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { isEmptyValue, recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
|
||||
import { requestListDocumentActions, requestListDocumentStatuses } from '@/api/ADempiere/window'
|
||||
import { requestListDocumentActions, requestListDocumentStatuses } from '@/api/ADempiere/workflow'
|
||||
|
||||
// Store used for set all related to context menu
|
||||
// for Window, Process, Smart Browser andother customized component
|
||||
|
@ -2,11 +2,11 @@
|
||||
import {
|
||||
requestGetEntity,
|
||||
requestListEntities
|
||||
} from '@/api/ADempiere/persistence.js'
|
||||
} from '@/api/ADempiere/common/persistence.js'
|
||||
import {
|
||||
requestDefaultValue,
|
||||
requestGetContextInfoValue
|
||||
} from '@/api/ADempiere/values'
|
||||
} from '@/api/ADempiere/window'
|
||||
import {
|
||||
getPrivateAccess,
|
||||
lockPrivateAccess,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { requestFieldMetadata } from '@/api/ADempiere/dictionary'
|
||||
import { requestFieldMetadata } from '@/api/ADempiere/dictionary/window'
|
||||
|
||||
const initStateLookup = {
|
||||
referenceList: [],
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { requestForm } from '@/api/ADempiere/dictionary'
|
||||
import { requestForm } from '@/api/ADempiere/dictionary/form'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import router from '@/router'
|
||||
|
@ -1,7 +1,20 @@
|
||||
import {
|
||||
getTranslations,
|
||||
requestUpdateEntity
|
||||
} from '@/api/ADempiere/persistence.js'
|
||||
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
import { requestUpdateEntity } from '@/api/ADempiere/common/persistence.js'
|
||||
import { requestTranslations } from '@/api/ADempiere/actions/translation.js'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
|
||||
const languageControl = {
|
||||
@ -82,7 +95,7 @@ const languageControl = {
|
||||
recordUuid,
|
||||
recordId
|
||||
}) {
|
||||
return getTranslations({
|
||||
return requestTranslations({
|
||||
recordUuid,
|
||||
recordId,
|
||||
tableName,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { requestLookup, requestLookupList } from '@/api/ADempiere/values.js'
|
||||
import { requestLookup, requestLookupList } from '@/api/ADempiere/window.js'
|
||||
import { getToken as getSession } from '@/utils/auth'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {
|
||||
requestCreateEntity,
|
||||
requestUpdateEntity
|
||||
} from '@/api/ADempiere/persistence.js'
|
||||
} from '@/api/ADempiere/common/persistence.js'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||
import { LOG_COLUMNS_NAME_LIST } from '@/utils/ADempiere/dataUtils.js'
|
||||
import language from '@/lang'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { requestProcessMetadata } from '@/api/ADempiere/dictionary.js'
|
||||
import { requestProcessMetadata } from '@/api/ADempiere/dictionary/process.js'
|
||||
import { showMessage } from '@/utils/ADempiere'
|
||||
import { generateProcess } from '@/utils/ADempiere/dictionaryUtils'
|
||||
import language from '@/lang'
|
||||
|
@ -3,8 +3,8 @@ import {
|
||||
requestUpdateEntity,
|
||||
requestDeleteEntity,
|
||||
rollbackEntity
|
||||
} from '@/api/ADempiere/persistence'
|
||||
import { requestReferencesList } from '@/api/ADempiere/values'
|
||||
} from '@/api/ADempiere/common/persistence'
|
||||
import { requestReferencesList } from '@/api/ADempiere/window'
|
||||
import { isEmptyValue, typeValue } from '@/utils/ADempiere/valueUtils.js'
|
||||
import { fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
|
||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { requestWindowMetadata } from '@/api/ADempiere/dictionary'
|
||||
import { requestWindowMetadata } from '@/api/ADempiere/dictionary/window'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import language from '@/lang'
|
||||
|
@ -28,7 +28,9 @@ export function request(requestValues) {
|
||||
if (!requestValues.params) {
|
||||
requestValues.params = {}
|
||||
}
|
||||
requestValues.baseURL = config.adempiere.api.url
|
||||
if (!requestValues.baseURL) {
|
||||
requestValues.baseURL = config.adempiere.api.url
|
||||
}
|
||||
// Timeout
|
||||
if (config.adempiere.api.timeout && config.adempiere.api.timeout > 0) {
|
||||
requestValues.timeout = config.adempiere.api.timeout
|
||||
|
@ -432,7 +432,6 @@ export default {
|
||||
}
|
||||
}
|
||||
})
|
||||
console.log(this.releasesListADVue)
|
||||
},
|
||||
// Proxy Adempiere Api
|
||||
fetchRepositoryProxy() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user