mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix(webapp): correct API endpoint URLs for universal search
Update resource URL mappings to match backend NestJS controller routes: - /sales/invoices -> /sale-invoices - /sales/estimates -> /sale-estimates - /sales/receipts -> /sale-receipts - /purchases/bills -> /bills - /sales/payment_receives -> /payments-received - /purchases/bill_payments -> /bill-payments - /sales/credit_notes -> /credit-notes - /purchases/vendor-credit -> /vendor-credits Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -32,19 +32,19 @@ export function useResourceData(type, query, props) {
|
||||
*/
|
||||
function getResourceUrlFromType(type) {
|
||||
const config = {
|
||||
[RESOURCES_TYPES.INVOICE]: '/sales/invoices',
|
||||
[RESOURCES_TYPES.ESTIMATE]: '/sales/estimates',
|
||||
[RESOURCES_TYPES.INVOICE]: '/sale-invoices',
|
||||
[RESOURCES_TYPES.ESTIMATE]: '/sale-estimates',
|
||||
[RESOURCES_TYPES.ITEM]: '/items',
|
||||
[RESOURCES_TYPES.RECEIPT]: '/sales/receipts',
|
||||
[RESOURCES_TYPES.BILL]: '/purchases/bills',
|
||||
[RESOURCES_TYPES.PAYMENT_RECEIVE]: '/sales/payment_receives',
|
||||
[RESOURCES_TYPES.PAYMENT_MADE]: '/purchases/bill_payments',
|
||||
[RESOURCES_TYPES.RECEIPT]: '/sale-receipts',
|
||||
[RESOURCES_TYPES.BILL]: '/bills',
|
||||
[RESOURCES_TYPES.PAYMENT_RECEIVE]: '/payments-received',
|
||||
[RESOURCES_TYPES.PAYMENT_MADE]: '/bill-payments',
|
||||
[RESOURCES_TYPES.CUSTOMER]: '/customers',
|
||||
[RESOURCES_TYPES.VENDOR]: '/vendors',
|
||||
[RESOURCES_TYPES.MANUAL_JOURNAL]: '/manual-journals',
|
||||
[RESOURCES_TYPES.ACCOUNT]: '/accounts',
|
||||
[RESOURCES_TYPES.CREDIT_NOTE]: '/sales/credit_notes',
|
||||
[RESOURCES_TYPES.VENDOR_CREDIT]: '/purchases/vendor-credit',
|
||||
[RESOURCES_TYPES.CREDIT_NOTE]: '/credit-notes',
|
||||
[RESOURCES_TYPES.VENDOR_CREDIT]: '/vendor-credits',
|
||||
};
|
||||
return config[type] || '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user