Skip to content

Commit

Permalink
feat: Reestructure UI to Field Management services.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Aug 27, 2024
1 parent 07142de commit b700d0c
Show file tree
Hide file tree
Showing 11 changed files with 76 additions and 76 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,28 +53,28 @@ export function requestDefaultValue({
let url
switch (true) {
case (!isEmptyValue(column_name) && isEmptyValue(table_name)):
url = `/user-interface/default-value/${table_name}/${column_name}`
url = `/fields/default-value/${table_name}/${column_name}`
break
case !isEmptyValue(column_id):
url = `/user-interface/default-value/column/${column_id}`
url = `/fields/default-value/column/${column_id}`
break
case !isEmptyValue(id):
url = `/user-interface/default-value/field/${id}`
url = `/fields/default-value/field/${id}`
break
case !isEmptyValue(process_parameter_id):
url = `/user-interface/default-value/parameter/${process_parameter_id}`
url = `/fields/default-value/parameter/${process_parameter_id}`
break
case !isEmptyValue(process_parameter_to_id):
url = `/user-interface/default-value/parameter/${process_parameter_to_id}/to`
url = `/fields/default-value/parameter/${process_parameter_to_id}/to`
break
case !isEmptyValue(browse_field_id):
url = `/user-interface/default-value/query-criteria/${browse_field_id}`
url = `/fields/default-value/query-criteria/${browse_field_id}`
break
case !isEmptyValue(browse_field_to_id):
url = `/user-interface/default-value/query-criteria/${browse_field_to_id}/to`
url = `/fields/default-value/query-criteria/${browse_field_to_id}/to`
break
default:
url = `/user-interface/default-value/`
url = `/fields/default-value/`
break
}
return request({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ export function requestLookupList({
let url
switch (true) {
case (!isEmptyValue(columnId)):
url = `/user-interface/lookups/column/${columnId}`
url = `/fields/lookups/column/${columnId}`
break
case !isEmptyValue(fieldId):
url = `/user-interface/lookups/field/${fieldId}`
url = `/fields/lookups/field/${fieldId}`
break
case !isEmptyValue(processParameterId):
url = `/user-interface/lookups/parameter/${processParameterId}`
url = `/fields/lookups/parameter/${processParameterId}`
break
case !isEmptyValue(browseFieldId):
url = `/user-interface/lookups/query-criteria/${browseFieldId}`
url = `/fields/lookups/query-criteria/${browseFieldId}`
break
default:
url = `/user-interface/lookups/${tableName}/${columnName}`
url = `/fields/lookups/${tableName}/${columnName}`
break
}

Expand Down
10 changes: 5 additions & 5 deletions src/api/ADempiere/field/search/business-partner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,19 @@ export function requestListBusinessPartner({
let url
switch (true) {
case !isEmptyValue(fieldId):
url = `/field/business-partners/field/${fieldId}`
url = `/fields/business-partners/field/${fieldId}`
break
case !isEmptyValue(processParameterId):
url = `/field/business-partners/parameter/${processParameterId}`
url = `/fields/business-partners/parameter/${processParameterId}`
break
case !isEmptyValue(browseFieldId):
url = `/field/business-partners/query-criteria/${browseFieldId}`
url = `/fields/business-partners/query-criteria/${browseFieldId}`
break
case !isEmptyValue(columnId):
url = `/field/business-partners/column/${columnId}`
url = `/fields/business-partners/column/${columnId}`
break
case (!isEmptyValue(tableName) && !isEmptyValue(columnName)):
url = `/field/business-partners/table/${tableName}/${columnName}`
url = `/fields/business-partners/table/${tableName}/${columnName}`
break
}

Expand Down
12 changes: 6 additions & 6 deletions src/api/ADempiere/field/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ export function requestGridGeneralInfo({
// }
// })

let url = 'user-interface/search-records'
let url = 'fields/searchs'
switch (true) {
case !isEmptyValue(fieldId):
url = `/user-interface/search-records/field/${fieldId}`
url = `/fields/searchs/field/${fieldId}`
break
case !isEmptyValue(processParameterId):
url = `/user-interface/search-records/parameter/${processParameterId}`
url = `/fields/searchs/parameter/${processParameterId}`
break
case !isEmptyValue(browseFieldId):
url = `/user-interface/search-records/query-criteria/${browseFieldId}`
url = `/fields/searchs/query-criteria/${browseFieldId}`
break
case !isEmptyValue(columnId):
url = `/user-interface/search-records/column/${columnId}`
url = `/fields/searchs/column/${columnId}`
break
case (!isEmptyValue(tableName) && !isEmptyValue(columnName)):
url = `/user-interface/search-records/${tableName}/${columnName}`
url = `/fields/searchs/${tableName}/${columnName}`
break
}

Expand Down
14 changes: 7 additions & 7 deletions src/api/ADempiere/field/search/invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function requestListOrders({
is_sales_transaction
}) {
return request({
url: '/field/invoices/orders',
url: '/fields/invoices/orders',
method: 'get',
params: {
filters,
Expand Down Expand Up @@ -68,7 +68,7 @@ export function requestListBusinessPartners({
is_sales_transaction
}) {
return request({
url: '/field/invoices/business-partners',
url: '/fields/invoices/business-partners',
method: 'get',
params: {
filters,
Expand Down Expand Up @@ -116,19 +116,19 @@ export function requestListInvoicesInfo({
let url
switch (true) {
case !isEmptyValue(fieldId):
url = `/field/invoices/field/${fieldId}`
url = `/fields/invoices/field/${fieldId}`
break
case !isEmptyValue(processParameterId):
url = `/field/invoices/parameter/${processParameterId}`
url = `/fields/invoices/parameter/${processParameterId}`
break
case !isEmptyValue(browseFieldId):
url = `/field/invoices/query-criteria/${browseFieldId}`
url = `/fields/invoices/query-criteria/${browseFieldId}`
break
case !isEmptyValue(columnId):
url = `/field/invoices/column/${columnId}`
url = `/fields/invoices/column/${columnId}`
break
case (!isEmptyValue(tableName) && !isEmptyValue(columnName)):
url = `/field/invoices/table/${tableName}/${columnName}`
url = `/fields/invoices/table/${tableName}/${columnName}`
break
}

Expand Down
14 changes: 7 additions & 7 deletions src/api/ADempiere/field/search/order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function requestListBusinessPartners({
is_sales_transaction
}) {
return request({
url: '/field/orders/customers',
url: '/fields/orders/customers',
method: 'get',
params: {
filters,
Expand Down Expand Up @@ -86,19 +86,19 @@ export function requestListOrderInfo({
let url
switch (true) {
case !isEmptyValue(fieldId):
url = `/field/orders/field/${fieldId}`
url = `/fields/orders/field/${fieldId}`
break
case !isEmptyValue(processParameterId):
url = `/field/orders/parameter/${processParameterId}`
url = `/fields/orders/parameter/${processParameterId}`
break
case !isEmptyValue(browseFieldId):
url = `/field/orders/query-criteria/${browseFieldId}`
url = `/fields/orders/query-criteria/${browseFieldId}`
break
case !isEmptyValue(columnId):
url = `/field/orders/column/${columnId}`
url = `/fields/orders/column/${columnId}`
break
case (!isEmptyValue(tableName) && !isEmptyValue(columnName)):
url = `/field/orders/table/${tableName}/${columnName}`
url = `/fields/orders/table/${tableName}/${columnName}`
break
}

Expand Down Expand Up @@ -139,7 +139,7 @@ export function requestGetOrderInfo({
id
}) {
return request({
url: `/field/orders/${id}`,
url: `/fields/orders/${id}`,
method: 'get'
})
}
20 changes: 10 additions & 10 deletions src/api/ADempiere/field/search/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function requestListBusinessPartners({
is_sales_transaction
}) {
return request({
url: '/field/payments/business-partners',
url: '/fields/payments/business-partners',
method: 'get',
params: {
filters,
Expand Down Expand Up @@ -68,7 +68,7 @@ export function requesListBankAccount({
is_sales_transaction
}) {
return request({
url: '/field/payments/bank-account',
url: '/fields/payments/bank-account',
method: 'get',
params: {
filters,
Expand Down Expand Up @@ -113,25 +113,25 @@ export function requestListPaymentsInfo({
orderId,
isWithoutValidation
}) {
let url = '/field/payments'
let url = '/fields/payments'
switch (true) {
case !isEmptyValue(fieldId):
url = `/field/payments/field/${fieldId}`
url = `/fields/payments/field/${fieldId}`
break
case !isEmptyValue(processParameterId):
url = `/field/payments/parameter/${processParameterId}`
url = `/fields/payments/parameter/${processParameterId}`
break
case !isEmptyValue(browseFieldId):
url = `/field/payments/query-criteria/${browseFieldId}`
url = `/fields/payments/query-criteria/${browseFieldId}`
break
case (!isEmptyValue(tableName) && !isEmptyValue(columnName)):
url = `/field/payments/table/${tableName}/${columnName}`
url = `/fields/payments/table/${tableName}/${columnName}`
break
case !isEmptyValue(columnId):
url = `/field/payments/column/${columnId}`
url = `/fields/payments/column/${columnId}`
break
default:
url = `/field/payments`
url = `/fields/payments`
break
}

Expand Down Expand Up @@ -172,7 +172,7 @@ export function requestGetOrderInfo({
id
}) {
return request({
url: `/field/payments/${id}`,
url: `/fields/payments/${id}`,
method: 'get'
})
}
Loading

0 comments on commit b700d0c

Please sign in to comment.