mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
Feature/#source code improve reorder implementation (#466)
* Improve source code and define structure for api Note that currently does not exist a way for spared api and search from backend or push, this pull request want reorder use of api by functionality or tool: - All inside ADempiere folder is dedicated for adempiere functionality - ADempiere/dashboard: use this path for add your api resource for all related with dashboard, note that already exist a file named dashboard.js with standard dashboard for ADempiere, if you want to add a new dashboard just create a new file <dashboard name>.js for gest info from backend - ADempiere/form: used for all form, for now exist the first implementation named price-checking.js that matched with components/ADempiere/form/PriceChecking, if you want to add a new form just add a new file here - ADempiere/browser.js: browser is a native functionality for Smart Browser tool, just add here all functions related for browser - ADempiere/private-access.js: just handle private access, will be used for add role table access and record access (nice to have) - ADempiere/process.js: related with all action for process and get information from server like getProcessLog and others - ADempiere/report.js: get info like getReportOutput from parameters used for window report and change print formats - ADempiere/rule.js: for now is used for dispatch callouts from server but will be implemented for run rules directly for client on languages like javascript, kotlin and groovy - ADempiere/system-core.js: just get generic functions like getWarehouseList and organization, also can be used for get langages and other infor from server - ADempiere/values.js: get info like lookup list, default values and other values like systen configurator - ADempiere/window.js: all functions related to window like record log, workflow log and other infor that can be used for container - ADempiere/persistence.js: handle standard CRUD for all entities and implement functions like getTranslation from entity * Improve source code and define structure for api Note that currently does not exist a way for spared api and search from backend or push, this pull request want reorder use of api by functionality or tool: - All inside ADempiere folder is dedicated for adempiere functionality - ADempiere/dashboard: use this path for add your api resource for all related with dashboard, note that already exist a file named dashboard.js with standard dashboard for ADempiere, if you want to add a new dashboard just create a new file <dashboard name>.js for gest info from backend - ADempiere/form: used for all form, for now exist the first implementation named price-checking.js that matched with components/ADempiere/form/PriceChecking, if you want to add a new form just add a new file here - ADempiere/browser.js: browser is a native functionality for Smart Browser tool, just add here all functions related for browser - ADempiere/private-access.js: just handle private access, will be used for add role table access and record access (nice to have) - ADempiere/process.js: related with all action for process and get information from server like getProcessLog and others - ADempiere/report.js: get info like getReportOutput from parameters used for window report and change print formats - ADempiere/rule.js: for now is used for dispatch callouts from server but will be implemented for run rules directly for client on languages like javascript, kotlin and groovy - ADempiere/system-core.js: just get generic functions like getWarehouseList and organization, also can be used for get langages and other infor from server - ADempiere/values.js: get info like lookup list, default values and other values like systen configurator - ADempiere/window.js: all functions related to window like record log, workflow log and other infor that can be used for container - ADempiere/persistence.js: handle standard CRUD for all entities and implement functions like getTranslation from entity
This commit is contained in:
parent
a5860e036d
commit
1c133bc87c
41
src/api/ADempiere/browser.js
Normal file
41
src/api/ADempiere/browser.js
Normal file
@ -0,0 +1,41 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a browser search
|
||||
* @param {string} uuid
|
||||
* @param {string} query
|
||||
* @param {string} whereClause
|
||||
* @param {string} orderByClause
|
||||
* @param {string} nextPageToken
|
||||
* @param {array} parametersList, This allows follow structure:
|
||||
* [{
|
||||
* columnName,
|
||||
* value
|
||||
* }]
|
||||
*/
|
||||
export function getBrowserSearch({ uuid, parametersList = [], query, whereClause, orderByClause, nextPageToken: pageToken, pageSize }) {
|
||||
// Run browser
|
||||
return Instance.call(this).requestListBrowserSearch({
|
||||
uuid,
|
||||
parametersList,
|
||||
query,
|
||||
whereClause,
|
||||
orderByClause,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
77
src/api/ADempiere/dashboard/dashboard.js
Normal file
77
src/api/ADempiere/dashboard/dashboard.js
Normal file
@ -0,0 +1,77 @@
|
||||
// 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
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
// Request a Process Activity list
|
||||
export function requestListProcessesLogs({ pageToken, pageSize }) {
|
||||
// Get Process Activity
|
||||
return Instance.call(this).requestListProcessesLogs({ pageToken, pageSize })
|
||||
}
|
||||
|
||||
// Get Recent Items based on selection option
|
||||
export function getRecentItems({ pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListRecentItems({ pageToken, pageSize })
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Favorites List
|
||||
* @param {string} userUuid
|
||||
*/
|
||||
export function getFavoritesFromServer({ userUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListFavorites({ userUuid, pageToken, pageSize })
|
||||
}
|
||||
|
||||
// Get pending documents
|
||||
export function getPendingDocumentsFromServer({ userUuid, roleUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListPendingDocuments({
|
||||
userUuid,
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// List all dashboard for role
|
||||
export function requestLisDashboards({ roleUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListDashboards({
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, documentAction, pageSize, pageToken }) {
|
||||
return Instance.call(this).requestListDocumentStatuses({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
documentAction,
|
||||
pageSize,
|
||||
pageToken
|
||||
})
|
||||
}
|
@ -1,567 +0,0 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Create entity
|
||||
* @param {string} parameters.tableName
|
||||
* @param {array} parameters.attributesList
|
||||
*/
|
||||
export function createEntity({ tableName, attributesList }) {
|
||||
return Instance.call(this).requestCreateEntity({
|
||||
tableName,
|
||||
attributesList
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Update entity
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
* @param {array} attributesList
|
||||
*/
|
||||
export function updateEntity({ tableName, recordId, recordUuid, attributesList }) {
|
||||
return Instance.call(this).requestUpdateEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
attributesList
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete entity
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
*/
|
||||
export function deleteEntity({ tableName, recordId, recordUuid }) {
|
||||
return Instance.call(this).requestDeleteEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid
|
||||
})
|
||||
}
|
||||
|
||||
export function getEntity({ tableName, recordId, recordUuid }) {
|
||||
return Instance.call(this).requestGetEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Object List from window
|
||||
* @param {string} tableName
|
||||
* @param {string} query
|
||||
* @param {string} whereClause
|
||||
* @param {array} conditionsList
|
||||
* @param {string} orderByClause
|
||||
* @param {string} pageToken
|
||||
*/
|
||||
export function getEntitiesList({
|
||||
tableName,
|
||||
query,
|
||||
whereClause,
|
||||
conditionsList = [],
|
||||
orderByClause,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListEntities({
|
||||
tableName,
|
||||
query,
|
||||
whereClause,
|
||||
conditionsList,
|
||||
orderByClause,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get Organization list from role
|
||||
export function getOrganizationsList({
|
||||
roleUuid,
|
||||
roleId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListOrganizations({
|
||||
roleUuid,
|
||||
roleId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get Warehouses of Organization
|
||||
export function getWarehousesList({
|
||||
organizationUuid,
|
||||
organizationId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListWarehouses({
|
||||
organizationUuid,
|
||||
organizationId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all operator or get key value type from value
|
||||
* @param {number} keyToFind
|
||||
EQUAL = 0;
|
||||
NOT_EQUAL = 1;
|
||||
LIKE = 2;
|
||||
NOT_LIKE = 3;
|
||||
GREATER = 4;
|
||||
GREATER_EQUAL = 5;
|
||||
LESS = 6;
|
||||
LESS_EQUAL = 7;
|
||||
BETWEEN = 8;
|
||||
NOT_NULL = 9;
|
||||
NULL = 10;
|
||||
IN = 11;
|
||||
NOT_IN = 12;
|
||||
*/
|
||||
export function getConditionOperators(keyToFind) {
|
||||
return Instance.call(this).getConditionOperators(keyToFind)
|
||||
}
|
||||
|
||||
/**
|
||||
* Rollback entity (Create, Update, Delete)
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} eventType
|
||||
*/
|
||||
export function rollbackEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
eventType
|
||||
}) {
|
||||
return Instance.call(this).requestRollbackEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
eventTypeExecuted: eventType
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 getLookup({
|
||||
tableName,
|
||||
directQuery,
|
||||
value
|
||||
}) {
|
||||
return Instance.call(this).requestLookupFromReference({
|
||||
tableName,
|
||||
directQuery,
|
||||
value
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a Lookup list data from Reference
|
||||
* The main attributes that function hope are:
|
||||
* @param {string} tableName
|
||||
* @param {string} query
|
||||
*/
|
||||
export function getLookupList({
|
||||
tableName,
|
||||
query,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListLookupFromReference({
|
||||
tableName,
|
||||
query,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a process
|
||||
* This function allows follow structure:
|
||||
* @param {string} uuid, uuid from process to run
|
||||
* @param {number} reportType
|
||||
* @param {number} tableName, table name of tab, used only window
|
||||
* @param {number} recordId, record identifier, used only window
|
||||
* @param {array} parametersList, parameters from process [{ columnName, value }]
|
||||
* @param {array} selectionsList, selection records, used only browser
|
||||
[{
|
||||
selectionId,
|
||||
selectionValues: [{ columnName, value }]
|
||||
}]
|
||||
* @param {string} printFormatUuid
|
||||
*/
|
||||
export function runProcess({ uuid, reportType, tableName, recordId, parametersList = [], selectionsList = [], printFormatUuid }) {
|
||||
// Run Process
|
||||
return Instance.call(this).requestRunProcess({
|
||||
uuid,
|
||||
reportType,
|
||||
tableName,
|
||||
recordId,
|
||||
parametersList,
|
||||
selectionsList,
|
||||
printFormatUuid
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a browser search
|
||||
* @param {string} uuid
|
||||
* @param {string} query
|
||||
* @param {string} whereClause
|
||||
* @param {string} orderByClause
|
||||
* @param {string} nextPageToken
|
||||
* @param {array} parametersList, This allows follow structure:
|
||||
* [{
|
||||
* columnName,
|
||||
* value
|
||||
* }]
|
||||
*/
|
||||
export function getBrowserSearch({ uuid, parametersList = [], query, whereClause, orderByClause, nextPageToken: pageToken, pageSize }) {
|
||||
// Run browser
|
||||
return Instance.call(this).requestListBrowserSearch({
|
||||
uuid,
|
||||
parametersList,
|
||||
query,
|
||||
whereClause,
|
||||
orderByClause,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Request a Process Activity list
|
||||
export function requestListProcessesLogs({ pageToken, pageSize }) {
|
||||
// Get Process Activity
|
||||
return Instance.call(this).requestListProcessesLogs({ pageToken, pageSize })
|
||||
}
|
||||
|
||||
export function getRecentItems({ pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListRecentItems({ pageToken, pageSize })
|
||||
}
|
||||
|
||||
/**
|
||||
* Reference List from Window
|
||||
* @param {string} tableName
|
||||
* @param {string} windowUuid
|
||||
* @param {string} recordUuid
|
||||
* @param {number} recordId
|
||||
*/
|
||||
export function getReferencesList({ windowUuid, tableName, recordId, recordUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListReferences({
|
||||
windowUuid,
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, valueType, callout, attributesList = [] }) {
|
||||
return Instance.call(this).requestRunCallout({
|
||||
windowUuid,
|
||||
windowNo,
|
||||
tabUuid,
|
||||
tableName,
|
||||
columnName,
|
||||
value,
|
||||
oldValue,
|
||||
valueType,
|
||||
callout,
|
||||
attributesList
|
||||
})
|
||||
}
|
||||
|
||||
export function getDefaultValueFromServer(query) {
|
||||
return Instance.call(this).requestGetDefaultValue(query)
|
||||
}
|
||||
|
||||
export function getContextInfoValueFromServer({ uuid, query }) {
|
||||
return Instance.call(this).requestGetContextInfoValue({ uuid, query })
|
||||
}
|
||||
|
||||
export function getPrivateAccessFromServer({ tableName, recordId, userUuid }) {
|
||||
return Instance.call(this).requestGetPrivateAccess({
|
||||
tableName,
|
||||
recordId,
|
||||
userUuid
|
||||
})
|
||||
}
|
||||
|
||||
export function lockPrivateAccessFromServer({ tableName, recordId, userUuid }) {
|
||||
return Instance.call(this).requestLockPrivateAccess({
|
||||
tableName,
|
||||
recordId,
|
||||
userUuid
|
||||
})
|
||||
}
|
||||
|
||||
export function unlockPrivateAccessFromServer({ tableName, recordId, userUuid }) {
|
||||
return Instance.call(this).requestUnlockPrivateAccess({
|
||||
tableName,
|
||||
recordId,
|
||||
userUuid
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Favorites List
|
||||
* @param {string} userUuid
|
||||
*/
|
||||
export function getFavoritesFromServer({ userUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListFavorites({ userUuid, pageToken, pageSize })
|
||||
}
|
||||
|
||||
export function getPendingDocumentsFromServer({ userUuid, roleUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListPendingDocuments({
|
||||
userUuid,
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Pending Documents List
|
||||
* @param {string} tableName
|
||||
* @param {string} processUuid
|
||||
*/
|
||||
export function requestReportViews({ tableName, processUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListReportViews({
|
||||
tableName,
|
||||
processUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function requestPrintFormats({ tableName, reportViewUuid, processUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListPrintFormats({
|
||||
tableName,
|
||||
reportViewUuid,
|
||||
processUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function requestLisDashboards({ roleUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListDashboards({
|
||||
roleUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function requestLanguages({ pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListLanguages({ pageToken, pageSize })
|
||||
}
|
||||
|
||||
/**
|
||||
* Request translations
|
||||
* @param {string} tableName
|
||||
* @param {string} language
|
||||
* @param {string} recordUuid
|
||||
* @param {integer} recordId
|
||||
*/
|
||||
export function requestTranslations({ tableName, language, recordUuid, recordId, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListTranslations({
|
||||
tableName,
|
||||
recordUuid,
|
||||
recordId,
|
||||
language,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function requestDrillTables({ tableName, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListDrillTables({
|
||||
tableName,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function getReportOutput({
|
||||
parametersList,
|
||||
tableName,
|
||||
printFormatUuid,
|
||||
reportViewUuid,
|
||||
isSummary,
|
||||
reportName,
|
||||
reportType
|
||||
}) {
|
||||
return Instance.call(this).requestGetReportOutput({
|
||||
parametersList,
|
||||
tableName,
|
||||
printFormatUuid,
|
||||
reportViewUuid,
|
||||
isSummary,
|
||||
reportName,
|
||||
reportType
|
||||
})
|
||||
}
|
||||
|
||||
export function requestListRecordsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListRecordsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function requestListWorkflowsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListWorkflowsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
export function requestListWorkflows({
|
||||
tableName,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListWorkflows({
|
||||
tableName,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} tableName
|
||||
* @param {integer} recordId
|
||||
* @param {string} pageToken
|
||||
* @param {string} pageSize
|
||||
*/
|
||||
export function requestListRecordChats({ tableName, recordId, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListRecordChats({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} uuid
|
||||
* @param {string} pageToken
|
||||
* @param {string} pageSize
|
||||
*/
|
||||
export function requestListChatEntries({ uuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListChatEntries({
|
||||
uuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} tableName
|
||||
* @param {string} recordId
|
||||
* @param {string} comment
|
||||
*/
|
||||
export function requestCreateChatEntry({ tableName, recordId, comment }) {
|
||||
return Instance.call(this).requestCreateChatEntry({
|
||||
tableName,
|
||||
recordId,
|
||||
comment
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Document Actions List
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
* @param {string} documentStatus
|
||||
* @param {string} documentAction
|
||||
* @param {number} pageSize
|
||||
* @param {string} pageToken
|
||||
*/
|
||||
export function requestListDocumentActions({ tableName, recordId, recordUuid, documentStatus, documentAction, pageSize, pageToken }) {
|
||||
return Instance.call(this).requestListDocumentActions({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
documentAction,
|
||||
pageSize,
|
||||
pageToken
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 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, documentAction, pageSize, pageToken }) {
|
||||
return Instance.call(this).requestListDocumentStatuses({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
documentStatus,
|
||||
documentAction,
|
||||
pageSize,
|
||||
pageToken
|
||||
})
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
import POS from '@adempiere/grpc-pos-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
@ -1,8 +1,5 @@
|
||||
// Export dictionary connection
|
||||
export * from './dictionary'
|
||||
|
||||
// Export data connection
|
||||
export * from './data'
|
||||
|
||||
// Export enrollment user connection
|
||||
export * from './enrollment'
|
||||
|
131
src/api/ADempiere/persistence.js
Normal file
131
src/api/ADempiere/persistence.js
Normal file
@ -0,0 +1,131 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Create entity
|
||||
* @param {string} parameters.tableName
|
||||
* @param {array} parameters.attributesList
|
||||
*/
|
||||
export function createEntity({ tableName, attributesList }) {
|
||||
return Instance.call(this).requestCreateEntity({
|
||||
tableName,
|
||||
attributesList
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Update entity
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
* @param {array} attributesList
|
||||
*/
|
||||
export function updateEntity({ tableName, recordId, recordUuid, attributesList }) {
|
||||
return Instance.call(this).requestUpdateEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
attributesList
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete entity
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} recordUuid
|
||||
*/
|
||||
export function deleteEntity({ tableName, recordId, recordUuid }) {
|
||||
return Instance.call(this).requestDeleteEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Rollback entity (Create, Update, Delete)
|
||||
* @param {string} tableName
|
||||
* @param {number} recordId
|
||||
* @param {string} eventType
|
||||
*/
|
||||
export function rollbackEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
eventType
|
||||
}) {
|
||||
return Instance.call(this).requestRollbackEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
eventTypeExecuted: eventType
|
||||
})
|
||||
}
|
||||
|
||||
// Get entity from table name and record id or record uuid
|
||||
export function getEntity({ tableName, recordId, recordUuid }) {
|
||||
return Instance.call(this).requestGetEntity({
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Object List from window
|
||||
* @param {string} tableName
|
||||
* @param {string} query
|
||||
* @param {string} whereClause
|
||||
* @param {array} conditionsList
|
||||
* @param {string} orderByClause
|
||||
* @param {string} pageToken
|
||||
*/
|
||||
export function getEntitiesList({
|
||||
tableName,
|
||||
query,
|
||||
whereClause,
|
||||
conditionsList = [],
|
||||
orderByClause,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListEntities({
|
||||
tableName,
|
||||
query,
|
||||
whereClause,
|
||||
conditionsList,
|
||||
orderByClause,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request translations
|
||||
* @param {string} tableName
|
||||
* @param {string} language
|
||||
* @param {string} recordUuid
|
||||
* @param {integer} recordId
|
||||
*/
|
||||
export function requestTranslations({ tableName, language, recordUuid, recordId, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListTranslations({
|
||||
tableName,
|
||||
recordUuid,
|
||||
recordId,
|
||||
language,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
42
src/api/ADempiere/private-access.js
Normal file
42
src/api/ADempiere/private-access.js
Normal file
@ -0,0 +1,42 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
// Get private access for a record
|
||||
export function getPrivateAccessFromServer({ tableName, recordId, userUuid }) {
|
||||
return Instance.call(this).requestGetPrivateAccess({
|
||||
tableName,
|
||||
recordId,
|
||||
userUuid
|
||||
})
|
||||
}
|
||||
|
||||
// Lock a record for a user
|
||||
export function lockPrivateAccessFromServer({ tableName, recordId, userUuid }) {
|
||||
return Instance.call(this).requestLockPrivateAccess({
|
||||
tableName,
|
||||
recordId,
|
||||
userUuid
|
||||
})
|
||||
}
|
||||
|
||||
// Unlock a record from a user
|
||||
export function unlockPrivateAccessFromServer({ tableName, recordId, userUuid }) {
|
||||
return Instance.call(this).requestUnlockPrivateAccess({
|
||||
tableName,
|
||||
recordId,
|
||||
userUuid
|
||||
})
|
||||
}
|
49
src/api/ADempiere/process.js
Normal file
49
src/api/ADempiere/process.js
Normal file
@ -0,0 +1,49 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a process
|
||||
* This function allows follow structure:
|
||||
* @param {string} uuid, uuid from process to run
|
||||
* @param {number} reportType
|
||||
* @param {number} tableName, table name of tab, used only window
|
||||
* @param {number} recordId, record identifier, used only window
|
||||
* @param {array} parametersList, parameters from process [{ columnName, value }]
|
||||
* @param {array} selectionsList, selection records, used only browser
|
||||
[{
|
||||
selectionId,
|
||||
selectionValues: [{ columnName, value }]
|
||||
}]
|
||||
* @param {string} printFormatUuid
|
||||
*/
|
||||
export function runProcess({ uuid, reportType, tableName, recordId, parametersList = [], selectionsList = [], printFormatUuid }) {
|
||||
// Run Process
|
||||
return Instance.call(this).requestRunProcess({
|
||||
uuid,
|
||||
reportType,
|
||||
tableName,
|
||||
recordId,
|
||||
parametersList,
|
||||
selectionsList,
|
||||
printFormatUuid
|
||||
})
|
||||
}
|
||||
|
||||
// Request a Process Activity list
|
||||
export function requestListProcessesLogs({ pageToken, pageSize }) {
|
||||
// Get Process Activity
|
||||
return Instance.call(this).requestListProcessesLogs({ pageToken, pageSize })
|
||||
}
|
70
src/api/ADempiere/report.js
Normal file
70
src/api/ADempiere/report.js
Normal file
@ -0,0 +1,70 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request Pending Documents List
|
||||
* @param {string} tableName
|
||||
* @param {string} processUuid
|
||||
*/
|
||||
export function requestReportViews({ tableName, processUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListReportViews({
|
||||
tableName,
|
||||
processUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get print formats from table name, report view uuid or process uuid
|
||||
export function requestPrintFormats({ tableName, reportViewUuid, processUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListPrintFormats({
|
||||
tableName,
|
||||
reportViewUuid,
|
||||
processUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get drill tables for a report
|
||||
export function requestDrillTables({ tableName, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListDrillTables({
|
||||
tableName,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get report output from parameters
|
||||
export function getReportOutput({
|
||||
parametersList,
|
||||
tableName,
|
||||
printFormatUuid,
|
||||
reportViewUuid,
|
||||
isSummary,
|
||||
reportName,
|
||||
reportType
|
||||
}) {
|
||||
return Instance.call(this).requestGetReportOutput({
|
||||
parametersList,
|
||||
tableName,
|
||||
printFormatUuid,
|
||||
reportViewUuid,
|
||||
isSummary,
|
||||
reportName,
|
||||
reportType
|
||||
})
|
||||
}
|
43
src/api/ADempiere/rule.js
Normal file
43
src/api/ADempiere/rule.js
Normal file
@ -0,0 +1,43 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 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, valueType, callout, attributesList = [] }) {
|
||||
return Instance.call(this).requestRunCallout({
|
||||
windowUuid,
|
||||
windowNo,
|
||||
tabUuid,
|
||||
tableName,
|
||||
columnName,
|
||||
value,
|
||||
oldValue,
|
||||
valueType,
|
||||
callout,
|
||||
attributesList
|
||||
})
|
||||
}
|
50
src/api/ADempiere/system-core.js
Normal file
50
src/api/ADempiere/system-core.js
Normal file
@ -0,0 +1,50 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
// Get Organization list from role
|
||||
export function getOrganizationsList({
|
||||
roleUuid,
|
||||
roleId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListOrganizations({
|
||||
roleUuid,
|
||||
roleId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get Warehouses of Organization
|
||||
export function getWarehousesList({
|
||||
organizationUuid,
|
||||
organizationId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListWarehouses({
|
||||
organizationUuid,
|
||||
organizationId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get languages from api
|
||||
export function requestLanguages({ pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListLanguages({ pageToken, pageSize })
|
||||
}
|
82
src/api/ADempiere/values.js
Normal file
82
src/api/ADempiere/values.js
Normal file
@ -0,0 +1,82 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 getLookup({
|
||||
tableName,
|
||||
directQuery,
|
||||
value
|
||||
}) {
|
||||
return Instance.call(this).requestLookupFromReference({
|
||||
tableName,
|
||||
directQuery,
|
||||
value
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Request a Lookup list data from Reference
|
||||
* The main attributes that function hope are:
|
||||
* @param {string} tableName
|
||||
* @param {string} query
|
||||
*/
|
||||
export function getLookupList({
|
||||
tableName,
|
||||
query,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListLookupFromReference({
|
||||
tableName,
|
||||
query,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Reference List from Window
|
||||
* @param {string} tableName
|
||||
* @param {string} windowUuid
|
||||
* @param {string} recordUuid
|
||||
* @param {number} recordId
|
||||
*/
|
||||
export function getReferencesList({ windowUuid, tableName, recordId, recordUuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListReferences({
|
||||
windowUuid,
|
||||
tableName,
|
||||
recordId,
|
||||
recordUuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get default value for a field
|
||||
export function getDefaultValueFromServer(query) {
|
||||
return Instance.call(this).requestGetDefaultValue(query)
|
||||
}
|
||||
|
||||
// Get context information for a window, tab or field
|
||||
export function getContextInfoValueFromServer({ uuid, query }) {
|
||||
return Instance.call(this).requestGetContextInfoValue({ uuid, query })
|
||||
}
|
99
src/api/ADempiere/window.js
Normal file
99
src/api/ADempiere/window.js
Normal file
@ -0,0 +1,99 @@
|
||||
import { getLanguage } from '@/lang/index'
|
||||
import BusinessData from '@adempiere/grpc-data-client'
|
||||
import { BUSINESS_DATA_ADDRESS } from '@/api/ADempiere/constants'
|
||||
import { getToken, getCurrentOrganization, getCurrentWarehouse } from '@/utils/auth'
|
||||
|
||||
// Get Instance for connection
|
||||
function Instance() {
|
||||
return new BusinessData({
|
||||
host: BUSINESS_DATA_ADDRESS,
|
||||
sessionUuid: getToken(),
|
||||
organizationUuid: getCurrentOrganization(),
|
||||
warehouseUuid: getCurrentWarehouse(),
|
||||
language: getLanguage() || 'en_US'
|
||||
})
|
||||
}
|
||||
|
||||
// Get list of log for a records
|
||||
export function requestListRecordsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListRecordsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get workflow log for a record
|
||||
export function requestListWorkflowsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListWorkflowsLogs({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
// Get workflow list for a document
|
||||
export function requestListWorkflows({
|
||||
tableName,
|
||||
pageToken,
|
||||
pageSize
|
||||
}) {
|
||||
return Instance.call(this).requestListWorkflows({
|
||||
tableName,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} tableName
|
||||
* @param {integer} recordId
|
||||
* @param {string} pageToken
|
||||
* @param {string} pageSize
|
||||
*/
|
||||
export function requestListRecordChats({ tableName, recordId, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListRecordChats({
|
||||
tableName,
|
||||
recordId,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} uuid
|
||||
* @param {string} pageToken
|
||||
* @param {string} pageSize
|
||||
*/
|
||||
export function requestListChatEntries({ uuid, pageToken, pageSize }) {
|
||||
return Instance.call(this).requestListChatEntries({
|
||||
uuid,
|
||||
pageToken,
|
||||
pageSize
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} tableName
|
||||
* @param {string} recordId
|
||||
* @param {string} comment
|
||||
*/
|
||||
export function requestCreateChatEntry({ tableName, recordId, comment }) {
|
||||
return Instance.call(this).requestCreateChatEntry({
|
||||
tableName,
|
||||
recordId,
|
||||
comment
|
||||
})
|
||||
}
|
@ -25,7 +25,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPendingDocumentsFromServer } from '@/api/ADempiere/data'
|
||||
import { getPendingDocumentsFromServer } from '@/api/ADempiere/dashboard/dashboard'
|
||||
import { recursiveTreeSearch } from '@/utils/ADempiere/valueUtils'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
props: {
|
||||
@ -47,8 +47,8 @@ export default {
|
||||
if (this.unsupportedDashboards.includes(this.metadata.fileName)) {
|
||||
return
|
||||
}
|
||||
if (this.metadata.fileName === 'userfavorites') {
|
||||
return () => import('@/components/ADempiere/Dashboard/favourites')
|
||||
if (isEmptyValue(this.metadata.fileName)) {
|
||||
return () => import('@/components/ADempiere/Dashboard/calendar')
|
||||
}
|
||||
return () => import(`@/components/ADempiere/Dashboard/${this.metadata.fileName}`)
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getRecentItems as getRecentItemsFromServer } from '@/api/ADempiere'
|
||||
import { getRecentItems as getRecentItemsFromServer } from '@/api/ADempiere/dashboard/dashboard'
|
||||
import { convertAction } from '@/utils/ADempiere/dictionaryUtils'
|
||||
import { recursiveTreeSearch } from '@/utils/ADempiere/valueUtils'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
|
@ -38,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getFavoritesFromServer } from '@/api/ADempiere/data'
|
||||
import { getFavoritesFromServer } from '@/api/ADempiere/dashboard/dashboard'
|
||||
import { convertAction } from '@/utils/ADempiere/dictionaryUtils'
|
||||
import { recursiveTreeSearch } from '@/utils/ADempiere/valueUtils'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
@ -69,6 +69,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import contextInfo from '@/components/ADempiere/Field/popover/contextInfo'
|
||||
import documentStatus from '@/components/ADempiere/Field/popover/documentStatus'
|
||||
import operatorComparison from '@/components/ADempiere/Field/popover/operatorComparison'
|
||||
@ -122,6 +123,9 @@ export default {
|
||||
computed: {
|
||||
// load the component that is indicated in the attributes of received property
|
||||
componentRender() {
|
||||
if (isEmptyValue(this.field.componentPath)) {
|
||||
return () => import('@/components/ADempiere/Field/FieldText')
|
||||
}
|
||||
if (this.isSelectCreated) {
|
||||
return () => import(`@/components/ADempiere/Field/FieldSelectMultiple`)
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
<script>
|
||||
import formMixin from '@/components/ADempiere/Form/formMixin'
|
||||
import fieldsList from './fieldsList.js'
|
||||
import { getProductPrice } from '@/api/ADempiere/pos'
|
||||
import { getProductPrice } from '@/api/ADempiere/form/price-checking'
|
||||
|
||||
export default {
|
||||
name: 'PriceInquiry',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getBrowserSearch } from '@/api/ADempiere/data'
|
||||
import { getBrowserSearch } from '@/api/ADempiere/browser'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { runCallOutRequest } from '@/api/ADempiere/data'
|
||||
import { runCallOutRequest } from '@/api/ADempiere/rule'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import language from '@/lang'
|
||||
|
||||
|
@ -5,7 +5,7 @@ import {
|
||||
requestListRecordChats,
|
||||
requestListChatEntries,
|
||||
requestCreateChatEntry
|
||||
} from '@/api/ADempiere/data'
|
||||
} from '@/api/ADempiere/window'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
|
||||
const initStateContainerInfo = {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { recursiveTreeSearch } from '@/utils/ADempiere/valueUtils.js'
|
||||
import { requestListDocumentActions, requestListDocumentStatuses } from '@/api/ADempiere/data'
|
||||
import { requestListDocumentActions, requestListDocumentStatuses } from '@/api/ADempiere/dashboard/dashboard'
|
||||
|
||||
// Store used for set all related to context menu
|
||||
// for Window, Process, Smart Browser andother customized component
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Default store for handle dashboard refresh and other functionalities
|
||||
import { requestLisDashboards, getRecentItems } from '@/api/ADempiere/data'
|
||||
import { requestLisDashboards, getRecentItems } from '@/api/ADempiere/dashboard/dashboard'
|
||||
import { convertAction } from '@/utils/ADempiere/dictionaryUtils'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { getCurrentRole } from '@/utils/auth'
|
||||
|
@ -1,13 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
import {
|
||||
getEntity,
|
||||
getEntitiesList,
|
||||
getDefaultValueFromServer,
|
||||
getContextInfoValueFromServer,
|
||||
getPrivateAccessFromServer,
|
||||
lockPrivateAccessFromServer,
|
||||
unlockPrivateAccessFromServer
|
||||
} from '@/api/ADempiere/data'
|
||||
import { getEntity, getEntitiesList } from '@/api/ADempiere/persistence'
|
||||
import { getDefaultValueFromServer, getContextInfoValueFromServer } from '@/api/ADempiere/values'
|
||||
import { getPrivateAccessFromServer, lockPrivateAccessFromServer, unlockPrivateAccessFromServer } from '@/api/ADempiere/private-access'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
|
@ -1,8 +1,5 @@
|
||||
import {
|
||||
requestLanguages,
|
||||
requestTranslations,
|
||||
updateEntity
|
||||
} from '@/api/ADempiere/data'
|
||||
import { requestLanguages } from '@/api/ADempiere/system-core'
|
||||
import { requestTranslations, updateEntity } from '@/api/ADempiere/persistence'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
|
||||
const languageControl = {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { getLookup, getLookupList } from '@/api/ADempiere/data'
|
||||
import { getLookup, getLookupList } from '@/api/ADempiere/values'
|
||||
import { getToken as getSession } from '@/utils/auth'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {
|
||||
runProcess,
|
||||
requestListProcessesLogs
|
||||
} from '@/api/ADempiere/data'
|
||||
} from '@/api/ADempiere/process'
|
||||
import { showNotification } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import language from '@/lang'
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
requestPrintFormats,
|
||||
requestDrillTables,
|
||||
getReportOutput
|
||||
} from '@/api/ADempiere/data'
|
||||
} from '@/api/ADempiere/report'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
|
||||
const initStateReportControl = {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { createEntity, updateEntity, deleteEntity, getReferencesList, rollbackEntity } from '@/api/ADempiere/data'
|
||||
import { createEntity, updateEntity, deleteEntity, rollbackEntity } from '@/api/ADempiere/persistence'
|
||||
import { getReferencesList } from '@/api/ADempiere/values'
|
||||
import { convertObjectToArrayPairs, isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
import { parseContext } from '@/utils/ADempiere/contextUtils'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
|
@ -13,7 +13,7 @@ import {
|
||||
removeCurrentWarehouse,
|
||||
removeCurrentOrganization
|
||||
} from '@/utils/auth'
|
||||
import { getOrganizationsList, getWarehousesList } from '@/api/ADempiere/data'
|
||||
import { getOrganizationsList, getWarehousesList } from '@/api/ADempiere/system-core'
|
||||
import router, { resetRouter } from '@/router'
|
||||
import { showMessage } from '@/utils/ADempiere/notification'
|
||||
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
|
||||
|
Loading…
x
Reference in New Issue
Block a user