mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 07:10:57 +00:00
fix ui
This commit is contained in:
12
apps/edr-freight-web/backoffice/src/DMS/api/dms.api.ts
Normal file
12
apps/edr-freight-web/backoffice/src/DMS/api/dms.api.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// STUB — see DMS/pages/_shared/utils.ts. DMS documents API, not migrated.
|
||||
// Returns empty lists so document lists render empty instead of crashing.
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function listMyDocuments(..._args: any[]): Promise<any[]> {
|
||||
return [];
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function getMyShares(..._args: any[]): Promise<any[]> {
|
||||
return [];
|
||||
}
|
||||
24
apps/edr-freight-web/backoffice/src/DMS/api/dms.http.ts
Normal file
24
apps/edr-freight-web/backoffice/src/DMS/api/dms.http.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
// STUB — see DMS/pages/_shared/utils.ts. DMS HTTP client, not migrated.
|
||||
// Returns empty payloads so any DMS call degrades to "no results" rather than
|
||||
// crashing. Wire the real @/DMS/api/dms.http if DMS is brought over.
|
||||
|
||||
function warn(method: string, url: string) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.warn(`[DMS stub] ${method} ${url} — DMS is not migrated; returning empty.`);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
async function empty<T = any>(): Promise<{ data: T }> {
|
||||
return { data: {} as T };
|
||||
}
|
||||
|
||||
export const dmsHttp = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
get: <T = any>(url: string): Promise<{ data: T }> => (warn("GET", url), empty<T>()),
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
post: <T = any>(url: string): Promise<{ data: T }> => (warn("POST", url), empty<T>()),
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
put: <T = any>(url: string): Promise<{ data: T }> => (warn("PUT", url), empty<T>()),
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
delete: <T = any>(url: string): Promise<{ data: T }> => (warn("DELETE", url), empty<T>()),
|
||||
};
|
||||
12
apps/edr-freight-web/backoffice/src/DMS/api/folders.api.ts
Normal file
12
apps/edr-freight-web/backoffice/src/DMS/api/folders.api.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// STUB — see DMS/pages/_shared/utils.ts. DMS folders API, not migrated.
|
||||
// Returns empty lists so folder pickers render empty instead of crashing.
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function getMySubFolders(..._args: any[]): Promise<any[]> {
|
||||
return [];
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export async function getMyCollaborationsSubFolders(..._args: any[]): Promise<any[]> {
|
||||
return [];
|
||||
}
|
||||
Reference in New Issue
Block a user