mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 12:01:57 +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": {
|
"adempiere": {
|
||||||
"api": {
|
"api": {
|
||||||
"url": "https://api.erpya.com/adempiere-api",
|
"url": "https://api.erpya.com/api",
|
||||||
"timeout": 10000
|
"timeout": 10000
|
||||||
},
|
},
|
||||||
"images": {
|
"images": {
|
||||||
"url": "https://api.erpya.com/adempiere-api/img"
|
"url": "https://api.erpya.com/adempiere-api"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -24,9 +24,9 @@ export function getPrivateAccess({
|
|||||||
recordUuid
|
recordUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/get-private-access',
|
url: '/user-interface/component/private-access/private-access',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
id: recordId,
|
id: recordId,
|
||||||
uuid: recordUuid
|
uuid: recordUuid
|
||||||
@ -48,7 +48,7 @@ export function lockPrivateAccess({
|
|||||||
recordUuid
|
recordUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/lock-private-access',
|
url: '/user-interface/component/private-access/lock-private-access',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -72,7 +72,7 @@ export function unlockPrivateAccess({
|
|||||||
recordUuid
|
recordUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/unlock-private-access',
|
url: '/user-interface/component/private-access/unlock-private-access',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
|
@ -31,7 +31,7 @@ export function getRecordAccess({
|
|||||||
}) {
|
}) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
request({
|
request({
|
||||||
url: '/ui/record-access',
|
url: '/user-interface/component/record-access/record-access',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -59,7 +59,7 @@ export function setRecordAccess({
|
|||||||
recordAccesses
|
recordAccesses
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/set-record-access',
|
url: '/user-interface/component/record-access/set-record-access',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
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({
|
return request({
|
||||||
url: '/ui/list-browser-items',
|
url: '/user-interface/smart-browser/browser-items',
|
||||||
data: {
|
data: {
|
||||||
// Running Parameters
|
// Running Parameters
|
||||||
uuid,
|
uuid,
|
||||||
|
@ -34,7 +34,7 @@ export function requestCreateEntity({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/data/create',
|
url: '/common/api/create',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -69,7 +69,7 @@ export function requestUpdateEntity({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/data/update',
|
url: '/common/api/update',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -97,7 +97,7 @@ export function requestDeleteEntity({
|
|||||||
recordUuid
|
recordUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/delete',
|
url: '/common/api/delete',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -122,7 +122,7 @@ export function rollbackEntity({
|
|||||||
eventType
|
eventType
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/rollback-entity',
|
url: '/common/api/rollback-entity',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -145,7 +145,7 @@ export function requestGetEntity({
|
|||||||
recordUuid
|
recordUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/data/entity',
|
url: '/common/api/entity',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -193,9 +193,9 @@ export function requestListEntities({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/data/list',
|
url: '/common/api/entites',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
// DSL Query
|
// DSL Query
|
||||||
filters,
|
filters,
|
||||||
@ -204,9 +204,7 @@ export function requestListEntities({
|
|||||||
query,
|
query,
|
||||||
where_clause: whereClause,
|
where_clause: whereClause,
|
||||||
order_by_clause: orderByClause,
|
order_by_clause: orderByClause,
|
||||||
limit
|
limit,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -218,99 +216,3 @@ export function requestListEntities({
|
|||||||
return convertEntityList(entitiesListResponse)
|
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
|
// Get Instance for connection
|
||||||
import { request } from '@/utils/ADempiere/request'
|
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
|
// List all dashboard for role
|
||||||
export function requestLisDashboards({
|
export function requestLisDashboards({
|
||||||
roleId,
|
roleId,
|
||||||
@ -127,13 +26,11 @@ export function requestLisDashboards({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/dashboard/list-dashboards',
|
url: '/dashboard/dashboards',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
role_id: roleId,
|
|
||||||
role_uuid: roleUuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
role_id: roleId,
|
||||||
|
role_uuid: roleUuid,
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
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'
|
import { request } from '@/utils/ADempiere/request'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Run callout request
|
* Request dictionary Form metadata
|
||||||
* @param {string} windowUuid
|
* @param {string} uuid universally unique identifier
|
||||||
* @param {number} windowNo
|
* @param {number} id, integer identifier
|
||||||
* @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({
|
export function requestForm({
|
||||||
windowUuid,
|
uuid,
|
||||||
windowNo,
|
id
|
||||||
tabUuid,
|
|
||||||
tableName,
|
|
||||||
columnName,
|
|
||||||
value,
|
|
||||||
oldValue,
|
|
||||||
callout,
|
|
||||||
attributesList = []
|
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/run-callout',
|
url: '/dictionary/form',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
uuid,
|
||||||
window_uuid: windowUuid,
|
id
|
||||||
tab_uuid: tabUuid,
|
|
||||||
callout,
|
|
||||||
column_name: columnName,
|
|
||||||
old_value: oldValue,
|
|
||||||
value,
|
|
||||||
window_no: windowNo,
|
|
||||||
attributes: attributesList
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(formResponse => {
|
||||||
return response
|
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({
|
export function requestFieldMetadata({
|
||||||
uuid,
|
uuid,
|
||||||
columnUuid,
|
columnUuid,
|
@ -33,7 +33,7 @@ export function requestEnrollUser({
|
|||||||
eMail
|
eMail
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/enrollment/enroll',
|
url: '/user/enrollment/enroll',
|
||||||
data: {
|
data: {
|
||||||
user_name: userName,
|
user_name: userName,
|
||||||
name,
|
name,
|
||||||
@ -65,7 +65,7 @@ export function requestForgotPassword(eMailOrUserName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/enrollment/reset-password',
|
url: '/user/enrollment/reset-password',
|
||||||
data: {
|
data: {
|
||||||
user_name: userName,
|
user_name: userName,
|
||||||
email: eMail,
|
email: eMail,
|
||||||
@ -91,7 +91,7 @@ export function requestChangePassword({
|
|||||||
password
|
password
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/enrollment/change-password',
|
url: '/user/enrollment/change-password',
|
||||||
data: {
|
data: {
|
||||||
token,
|
token,
|
||||||
password,
|
password,
|
||||||
@ -116,7 +116,7 @@ export function requestActivateUser({
|
|||||||
token
|
token
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/enrollment/activate-user',
|
url: '/user/enrollment/activate-user',
|
||||||
data: {
|
data: {
|
||||||
token,
|
token,
|
||||||
client_version: clientVersion,
|
client_version: clientVersion,
|
||||||
|
@ -23,7 +23,7 @@ export function getResource({
|
|||||||
uuid,
|
uuid,
|
||||||
tableName
|
tableName
|
||||||
}) {
|
}) {
|
||||||
const { requestGetEntity } = require('@/api/ADempiere/persistence.js')
|
const { requestGetEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||||
|
|
||||||
return requestGetEntity({
|
return requestGetEntity({
|
||||||
recordUuid: uuid,
|
recordUuid: uuid,
|
||||||
@ -42,7 +42,7 @@ export function updateResource({
|
|||||||
tableName,
|
tableName,
|
||||||
binaryFile
|
binaryFile
|
||||||
}) {
|
}) {
|
||||||
const { requestUpdateEntity } = require('@/api/ADempiere/persistence.js')
|
const { requestUpdateEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||||
|
|
||||||
return requestUpdateEntity({
|
return requestUpdateEntity({
|
||||||
recordUuid: uuid,
|
recordUuid: uuid,
|
||||||
|
@ -23,7 +23,7 @@ const tableName = 'C_Location'
|
|||||||
export function createLocationAddress({
|
export function createLocationAddress({
|
||||||
attributesList
|
attributesList
|
||||||
}) {
|
}) {
|
||||||
const { requestCreateEntity } = require('@/api/ADempiere/persistence.js')
|
const { requestCreateEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||||
|
|
||||||
return requestCreateEntity({
|
return requestCreateEntity({
|
||||||
tableName,
|
tableName,
|
||||||
@ -40,7 +40,7 @@ export function getLocationAddress({
|
|||||||
id,
|
id,
|
||||||
uuid
|
uuid
|
||||||
}) {
|
}) {
|
||||||
const { requestGetEntity } = require('@/api/ADempiere/persistence.js')
|
const { requestGetEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||||
|
|
||||||
return requestGetEntity({
|
return requestGetEntity({
|
||||||
tableName,
|
tableName,
|
||||||
@ -60,7 +60,7 @@ export function updateLocationAddress({
|
|||||||
uuid,
|
uuid,
|
||||||
attributesList
|
attributesList
|
||||||
}) {
|
}) {
|
||||||
const { requestUpdateEntity } = require('@/api/ADempiere/persistence.js')
|
const { requestUpdateEntity } = require('@/api/ADempiere/common/persistence.js')
|
||||||
|
|
||||||
return requestUpdateEntity({
|
return requestUpdateEntity({
|
||||||
tableName,
|
tableName,
|
||||||
|
@ -22,7 +22,7 @@ const tableName = 'M_Locator'
|
|||||||
export function getLocatorList({
|
export function getLocatorList({
|
||||||
warehouseId
|
warehouseId
|
||||||
}) {
|
}) {
|
||||||
const { requestListEntities } = require('@/api/ADempiere/persistence.js')
|
const { requestListEntities } = require('@/api/ADempiere/common/persistence.js')
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
requestListEntities({
|
requestListEntities({
|
||||||
tableName,
|
tableName,
|
||||||
|
@ -30,7 +30,7 @@ export function setPreference({
|
|||||||
isForCurrentContainer
|
isForCurrentContainer
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/set-preference',
|
url: '/user-interface/component/preference/set-preference',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
container_uuid: parentUuid,
|
container_uuid: parentUuid,
|
||||||
@ -55,7 +55,7 @@ export function deletePreference({
|
|||||||
isForCurrentContainer
|
isForCurrentContainer
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/delete-preference',
|
url: '/user-interface/component/preference/delete-preference',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
container_uuid: parentUuid,
|
container_uuid: parentUuid,
|
||||||
|
@ -31,9 +31,9 @@ export function requestGetPointOfSales({
|
|||||||
posUuid
|
posUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/get-point-of-sales',
|
url: '/form/addons/point-of-sales/point-of-sales',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
point_of_sales_uuid: posUuid
|
point_of_sales_uuid: posUuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -51,12 +51,10 @@ export function requestListPointOfSales({
|
|||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/list-point-of-sales',
|
url: '/form/addons/point-of-sales/selling-points',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
user_uuid: userUuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
user_uuid: userUuid,
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
page_token: pageToken
|
page_token: pageToken
|
||||||
}
|
}
|
||||||
@ -82,7 +80,7 @@ export function requestCreateOrder({
|
|||||||
salesRepresentativeUuid
|
salesRepresentativeUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/create-order',
|
url: '/form/addons/point-of-sales/create-order',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -106,7 +104,7 @@ export function requestUpdateOrder({
|
|||||||
description
|
description
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/update-order',
|
url: '/form/addons/point-of-sales/update-order',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_uuid: orderUuid,
|
order_uuid: orderUuid,
|
||||||
@ -125,9 +123,9 @@ export function requestUpdateOrder({
|
|||||||
// Get order from uuid
|
// Get order from uuid
|
||||||
export function requestGetOrder(orderUuid) {
|
export function requestGetOrder(orderUuid) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/get-order',
|
url: '/form/addons/point-of-sales/order',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
order_uuid: orderUuid
|
order_uuid: orderUuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -147,7 +145,7 @@ export function requestDeleteOrder({
|
|||||||
// salesRepresentativeUuid
|
// salesRepresentativeUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/delete-order',
|
url: '/form/addons/point-of-sales/delete-order',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_uuid: orderUuid
|
order_uuid: orderUuid
|
||||||
@ -222,9 +220,9 @@ export function requestListOrders({
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/list-orders',
|
url: '/form/addons/point-of-sales/orders',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
document_no: documentNo,
|
document_no: documentNo,
|
||||||
business_partner_uuid: businessPartnerUuid,
|
business_partner_uuid: businessPartnerUuid,
|
||||||
@ -234,11 +232,7 @@ export function requestListOrders({
|
|||||||
is_paid: isPaid,
|
is_paid: isPaid,
|
||||||
is_processed: isProcessed,
|
is_processed: isProcessed,
|
||||||
is_aisle_seller: isAisleSeller,
|
is_aisle_seller: isAisleSeller,
|
||||||
is_invoiced: isInvoiced
|
is_invoiced: isInvoiced,
|
||||||
// date_ordered_from: dateOrderedFrom,
|
|
||||||
// date_ordered_to: dateOrderedTo
|
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
page_token: pageToken
|
page_token: pageToken
|
||||||
}
|
}
|
||||||
@ -268,9 +262,9 @@ export function requestCreateOrderLine({
|
|||||||
discountRate
|
discountRate
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/create-order-line',
|
url: '/form/addons/point-of-sales/create-order-line',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
params: {
|
||||||
order_uuid: orderUuid,
|
order_uuid: orderUuid,
|
||||||
product_uuid: productUuid,
|
product_uuid: productUuid,
|
||||||
description,
|
description,
|
||||||
@ -297,7 +291,7 @@ export function requestUpdateOrderLine({
|
|||||||
discountRate
|
discountRate
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/update-order-line',
|
url: '/form/addons/point-of-sales/update-order-line',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
// is_add_quantity: true,
|
// is_add_quantity: true,
|
||||||
@ -320,7 +314,7 @@ export function requestDeleteOrderLine({
|
|||||||
orderLineUuid
|
orderLineUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/delete-order-line',
|
url: '/form/addons/point-of-sales/delete-order-line',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
order_line_uuid: orderLineUuid
|
order_line_uuid: orderLineUuid
|
||||||
@ -337,12 +331,10 @@ export function requestListOrderLines({
|
|||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/list-order-lines',
|
url: '/form/addons/point-of-sales/order-lines',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
order_uuid: orderUuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
order_uuid: orderUuid,
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
page_token: pageToken
|
page_token: pageToken
|
||||||
}
|
}
|
||||||
@ -362,9 +354,9 @@ export function requestListOrderLines({
|
|||||||
|
|
||||||
export function getKeyLayout({ keyLayoutUuid }) {
|
export function getKeyLayout({ keyLayoutUuid }) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/get-key-layout',
|
url: '/form/addons/point-of-sales/key-layout',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
key_layout_uuid: keyLayoutUuid
|
key_layout_uuid: keyLayoutUuid
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -388,16 +380,14 @@ export function getProductPriceList({
|
|||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/list-product-prices',
|
url: '/form/addons/point-of-sales/product-prices',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
price_list_uuid: priceListUuid,
|
price_list_uuid: priceListUuid,
|
||||||
search_value: searchValue,
|
search_value: searchValue,
|
||||||
valid_from: validFrom,
|
valid_from: validFrom,
|
||||||
business_partner_uuid: businessPartnerUuid,
|
business_partner_uuid: businessPartnerUuid,
|
||||||
warehouse_uuid: warehouseUuid
|
warehouse_uuid: warehouseUuid,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
page_token: pageToken
|
page_token: pageToken
|
||||||
}
|
}
|
||||||
@ -475,7 +465,7 @@ export function createPayment({
|
|||||||
currencyUuid
|
currencyUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/create-payment',
|
url: '/form/addons/point-of-sales/create-payment',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
@ -507,7 +497,7 @@ export function updatePayment({
|
|||||||
tenderTypeCode
|
tenderTypeCode
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/update-payment',
|
url: '/form/addons/point-of-sales/update-payment',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
payment_uuid: paymentUuid,
|
payment_uuid: paymentUuid,
|
||||||
@ -530,7 +520,7 @@ export function deletePayment({
|
|||||||
paymentUuid
|
paymentUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/delete-payment',
|
url: '/form/addons/point-of-sales/delete-payment',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
payment_uuid: paymentUuid
|
payment_uuid: paymentUuid
|
||||||
@ -548,9 +538,9 @@ export function getPaymentsList({
|
|||||||
orderUuid
|
orderUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/list-payments',
|
url: '/form/addons/point-of-sales/payments',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
order_uuid: orderUuid
|
order_uuid: orderUuid
|
||||||
}
|
}
|
||||||
@ -609,7 +599,7 @@ export function processOrder({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/process-order',
|
url: '/form/addons/point-of-sales/process-order',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
pos_uuid: posUuid,
|
pos_uuid: posUuid,
|
||||||
|
@ -29,9 +29,9 @@ export function requestGetProductPrice({
|
|||||||
validFrom
|
validFrom
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/pos/get-product-price',
|
url: '/form/addons/point-of-sales/get-product-price',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
search_value: searchValue,
|
search_value: searchValue,
|
||||||
upc,
|
upc,
|
||||||
value,
|
value,
|
||||||
|
@ -57,7 +57,7 @@ export function requestRunProcess({
|
|||||||
})
|
})
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/data/process',
|
url: '/common/api/process',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
process_uuid: uuid,
|
process_uuid: uuid,
|
||||||
@ -92,16 +92,14 @@ export function requestListProcessesLogs({
|
|||||||
}) {
|
}) {
|
||||||
// Get Process Activity
|
// Get Process Activity
|
||||||
return request({
|
return request({
|
||||||
url: '/logs/list-process-logs',
|
url: '/user/log/process-logs',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
instance_uuid: instanceUuid,
|
instance_uuid: instanceUuid,
|
||||||
user_uuid: userUuid,
|
user_uuid: userUuid,
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
id: recordId,
|
id: recordId,
|
||||||
uuid: recordUuid
|
uuid: recordUuid,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
page_token: pageToken
|
page_token: pageToken
|
||||||
}
|
}
|
||||||
|
@ -29,13 +29,11 @@ export function requestListReportsViews({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/list-report-views',
|
url: '/user-interface/process/report-views',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
table_name: tableName,
|
|
||||||
process_uuid: processUuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
table_name: tableName,
|
||||||
|
process_uuid: processUuid,
|
||||||
page_token: pageToken,
|
page_token: pageToken,
|
||||||
page_size: pageSize
|
page_size: pageSize
|
||||||
}
|
}
|
||||||
@ -62,14 +60,12 @@ export function requestListPrintFormats({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/list-print-formats',
|
url: '/user-interface/process/print-formats',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
report_view_uuid: reportViewUuid,
|
report_view_uuid: reportViewUuid,
|
||||||
process_uuid: processUuid
|
process_uuid: processUuid,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page_token: pageToken,
|
page_token: pageToken,
|
||||||
page_size: pageSize
|
page_size: pageSize
|
||||||
}
|
}
|
||||||
@ -88,12 +84,10 @@ export function requestListDrillTables({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/list-drill-tables',
|
url: '/user-interface/process/drill-tables',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
table_name: tableName
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
table_name: tableName,
|
||||||
page_token: pageToken,
|
page_token: pageToken,
|
||||||
page_size: pageSize
|
page_size: pageSize
|
||||||
}
|
}
|
||||||
@ -126,9 +120,9 @@ export function requestGetReportOutput({
|
|||||||
orderByClause
|
orderByClause
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/get-report-output',
|
url: '/user-interface/process/report-output',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
// reference
|
// reference
|
||||||
print_format_uuid: printFormatUuid,
|
print_format_uuid: printFormatUuid,
|
||||||
|
@ -25,13 +25,11 @@ export function requestOrganizationsList({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/list-organizations',
|
url: '/common/organizations',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
role_id: roleId,
|
|
||||||
role_uuid: roleUuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
role_id: roleId,
|
||||||
|
role_uuid: roleUuid,
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -58,13 +56,11 @@ export function requestWarehousesList({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/list-warehouses',
|
url: '/common/warehouses',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
organization_id: organizationId,
|
|
||||||
organization_uuid: organizationUuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
organization_id: organizationId,
|
||||||
|
organization_uuid: organizationUuid,
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -89,7 +85,7 @@ export function requestGetCountryDefinition({
|
|||||||
uuid
|
uuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/country',
|
url: '/common/country',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
id,
|
id,
|
||||||
@ -109,8 +105,8 @@ export function requestLanguagesList({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/list-languages',
|
url: '/common/languages',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
@ -156,7 +152,7 @@ export function requestCreateBusinessPartner({
|
|||||||
posUuid
|
posUuid
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/create-business-partner',
|
url: '/common/create-business-partner',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
value,
|
value,
|
||||||
@ -195,7 +191,7 @@ export function requestGetBusinessPartner({
|
|||||||
searchValue
|
searchValue
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/get-business-partner',
|
url: '/common/business-partner',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: {
|
params: {
|
||||||
search_value: searchValue
|
search_value: searchValue
|
||||||
@ -222,9 +218,9 @@ export function requestListBusinessPartner({
|
|||||||
pageToken
|
pageToken
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/list-business-partner',
|
url: '/common/business-partners',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
search_value: searchValue,
|
search_value: searchValue,
|
||||||
value,
|
value,
|
||||||
name,
|
name,
|
||||||
@ -232,9 +228,7 @@ export function requestListBusinessPartner({
|
|||||||
e_mail: eMail,
|
e_mail: eMail,
|
||||||
phone,
|
phone,
|
||||||
// Location
|
// Location
|
||||||
postal_code: postalCode
|
postal_code: postalCode,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
page_size: pageSize,
|
page_size: pageSize,
|
||||||
page_token: pageToken
|
page_token: pageToken
|
||||||
}
|
}
|
||||||
@ -267,9 +261,9 @@ export function requestGetConversionRate({
|
|||||||
conversionDate
|
conversionDate
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/core/get-conversion-rate',
|
url: '/common/conversion-rate',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
conversion_type_uuid: conversionTypeUuid,
|
conversion_type_uuid: conversionTypeUuid,
|
||||||
currency_from_uuid: currencyFromUuid,
|
currency_from_uuid: currencyFromUuid,
|
||||||
currency_to_uuid: currencyToUuid,
|
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
|
// Get Instance for connection
|
||||||
import { request } from '@/utils/ADempiere/request'
|
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
|
// Get list of log for a records
|
||||||
export function requestListEntityLogs({
|
export function requestListEntityLogs({
|
||||||
tableName,
|
tableName,
|
||||||
@ -26,14 +230,12 @@ export function requestListEntityLogs({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/logs/list-entity-logs',
|
url: '/user/log/entity-logs',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
id: recordId,
|
id: recordId,
|
||||||
uuid: recordUuid
|
uuid: recordUuid,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -61,14 +263,12 @@ export function requestListWorkflowsLogs({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/logs/list-workflow-logs',
|
url: '/user/log/workflow-logs',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
id: recordId,
|
id: recordId,
|
||||||
uuid: recordUuid
|
uuid: recordUuid,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -94,12 +294,10 @@ export function requestListWorkflows({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/workflow/list-workflow',
|
url: '/user/log/workflow-logs',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
table_name: tableName
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
table_name: tableName,
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -132,14 +330,12 @@ export function requestListEntityChats({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/logs/list-entity-chats',
|
url: '/user/log/entity-chats',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
params: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
id: recordId,
|
id: recordId,
|
||||||
uuid: recordUuid
|
uuid: recordUuid,
|
||||||
},
|
|
||||||
params: {
|
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -170,13 +366,11 @@ export function requestListChatsEntries({
|
|||||||
pageSize
|
pageSize
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/logs/list-chat-entries',
|
url: '/user/log/chat-entries',
|
||||||
method: 'post',
|
method: 'get',
|
||||||
data: {
|
|
||||||
id,
|
|
||||||
uuid
|
|
||||||
},
|
|
||||||
params: {
|
params: {
|
||||||
|
id,
|
||||||
|
uuid,
|
||||||
// Page Data
|
// Page Data
|
||||||
pageToken,
|
pageToken,
|
||||||
pageSize
|
pageSize
|
||||||
@ -208,7 +402,7 @@ export function requestCreateChatEntry({
|
|||||||
comment
|
comment
|
||||||
}) {
|
}) {
|
||||||
return request({
|
return request({
|
||||||
url: '/ui/create-chat-entry',
|
url: '/user-interface/component/notes/create-chat-entry',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
table_name: tableName,
|
table_name: tableName,
|
||||||
@ -223,83 +417,3 @@ export function requestCreateChatEntry({
|
|||||||
return convertChatEntry(chatEntryResponse)
|
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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPendingDocumentsFromServer } from '@/api/ADempiere/dashboard/dashboard'
|
import { getPendingDocumentsFromServer } from '@/api/ADempiere/dashboard/tasks'
|
||||||
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { requestListRecentItems } from '@/api/ADempiere/dashboard/dashboard'
|
import { requestListRecentItems } from '@/api/ADempiere/dashboard/user'
|
||||||
import { convertAction } from '@/utils/ADempiere/dictionaryUtils'
|
import { convertAction } from '@/utils/ADempiere/dictionaryUtils'
|
||||||
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.js'
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { convertAction } from '@/utils/ADempiere/dictionaryUtils.js'
|
||||||
import mixinDashboard from '@/components/ADempiere/Dashboard/mixinDashboard.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 { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
||||||
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.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 {
|
export default {
|
||||||
name: 'BarcodeReader',
|
name: 'BarcodeReader',
|
||||||
|
@ -106,7 +106,7 @@ import fieldsList from './fieldsList.js'
|
|||||||
import { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
import { requestGetProductPrice } from '@/api/ADempiere/form/price-checking.js'
|
||||||
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
import { formatPercent, formatPrice } from '@/utils/ADempiere/valueFormat.js'
|
||||||
import { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.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 {
|
export default {
|
||||||
name: 'PriceChecking',
|
name: 'PriceChecking',
|
||||||
|
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import VueContentLoading from '@/components/ADempiere/ContentLoader'
|
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 { buildImageFromArrayBuffer } from '@/utils/ADempiere/resource.js'
|
||||||
import { formatQuantity } from '@/utils/ADempiere/valueFormat.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 { showMessage } from '@/utils/ADempiere/notification'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
import { generateField } from '@/utils/ADempiere/dictionaryUtils'
|
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 { showMessage } from '@/utils/ADempiere/notification'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
import language from '@/lang'
|
import language from '@/lang'
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { isEmptyValue, recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
|
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
|
// Store used for set all related to context menu
|
||||||
// for Window, Process, Smart Browser andother customized component
|
// for Window, Process, Smart Browser andother customized component
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
import {
|
import {
|
||||||
requestGetEntity,
|
requestGetEntity,
|
||||||
requestListEntities
|
requestListEntities
|
||||||
} from '@/api/ADempiere/persistence.js'
|
} from '@/api/ADempiere/common/persistence.js'
|
||||||
import {
|
import {
|
||||||
requestDefaultValue,
|
requestDefaultValue,
|
||||||
requestGetContextInfoValue
|
requestGetContextInfoValue
|
||||||
} from '@/api/ADempiere/values'
|
} from '@/api/ADempiere/window'
|
||||||
import {
|
import {
|
||||||
getPrivateAccess,
|
getPrivateAccess,
|
||||||
lockPrivateAccess,
|
lockPrivateAccess,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { requestFieldMetadata } from '@/api/ADempiere/dictionary'
|
import { requestFieldMetadata } from '@/api/ADempiere/dictionary/window'
|
||||||
|
|
||||||
const initStateLookup = {
|
const initStateLookup = {
|
||||||
referenceList: [],
|
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 { showMessage } from '@/utils/ADempiere/notification'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
|
@ -1,7 +1,20 @@
|
|||||||
import {
|
// ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution
|
||||||
getTranslations,
|
// Copyright (C) 2017-Present E.R.P. Consultores y Asociados, C.A.
|
||||||
requestUpdateEntity
|
// Contributor(s): Yamel Senih ysenih@erpya.com www.erpya.com
|
||||||
} from '@/api/ADempiere/persistence.js'
|
// 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'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
|
|
||||||
const languageControl = {
|
const languageControl = {
|
||||||
@ -82,7 +95,7 @@ const languageControl = {
|
|||||||
recordUuid,
|
recordUuid,
|
||||||
recordId
|
recordId
|
||||||
}) {
|
}) {
|
||||||
return getTranslations({
|
return requestTranslations({
|
||||||
recordUuid,
|
recordUuid,
|
||||||
recordId,
|
recordId,
|
||||||
tableName,
|
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 { getToken as getSession } from '@/utils/auth'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
requestCreateEntity,
|
requestCreateEntity,
|
||||||
requestUpdateEntity
|
requestUpdateEntity
|
||||||
} from '@/api/ADempiere/persistence.js'
|
} from '@/api/ADempiere/common/persistence.js'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils.js'
|
||||||
import { LOG_COLUMNS_NAME_LIST } from '@/utils/ADempiere/dataUtils.js'
|
import { LOG_COLUMNS_NAME_LIST } from '@/utils/ADempiere/dataUtils.js'
|
||||||
import language from '@/lang'
|
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 { showMessage } from '@/utils/ADempiere'
|
||||||
import { generateProcess } from '@/utils/ADempiere/dictionaryUtils'
|
import { generateProcess } from '@/utils/ADempiere/dictionaryUtils'
|
||||||
import language from '@/lang'
|
import language from '@/lang'
|
||||||
|
@ -3,8 +3,8 @@ import {
|
|||||||
requestUpdateEntity,
|
requestUpdateEntity,
|
||||||
requestDeleteEntity,
|
requestDeleteEntity,
|
||||||
rollbackEntity
|
rollbackEntity
|
||||||
} from '@/api/ADempiere/persistence'
|
} from '@/api/ADempiere/common/persistence'
|
||||||
import { requestReferencesList } from '@/api/ADempiere/values'
|
import { requestReferencesList } from '@/api/ADempiere/window'
|
||||||
import { isEmptyValue, typeValue } from '@/utils/ADempiere/valueUtils.js'
|
import { isEmptyValue, typeValue } from '@/utils/ADempiere/valueUtils.js'
|
||||||
import { fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
|
import { fieldIsDisplayed } from '@/utils/ADempiere/dictionaryUtils'
|
||||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
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 { showMessage } from '@/utils/ADempiere/notification'
|
||||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||||
import language from '@/lang'
|
import language from '@/lang'
|
||||||
|
@ -28,7 +28,9 @@ export function request(requestValues) {
|
|||||||
if (!requestValues.params) {
|
if (!requestValues.params) {
|
||||||
requestValues.params = {}
|
requestValues.params = {}
|
||||||
}
|
}
|
||||||
requestValues.baseURL = config.adempiere.api.url
|
if (!requestValues.baseURL) {
|
||||||
|
requestValues.baseURL = config.adempiere.api.url
|
||||||
|
}
|
||||||
// Timeout
|
// Timeout
|
||||||
if (config.adempiere.api.timeout && config.adempiere.api.timeout > 0) {
|
if (config.adempiere.api.timeout && config.adempiere.api.timeout > 0) {
|
||||||
requestValues.timeout = config.adempiere.api.timeout
|
requestValues.timeout = config.adempiere.api.timeout
|
||||||
|
@ -432,7 +432,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log(this.releasesListADVue)
|
|
||||||
},
|
},
|
||||||
// Proxy Adempiere Api
|
// Proxy Adempiere Api
|
||||||
fetchRepositoryProxy() {
|
fetchRepositoryProxy() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user