chore: change file location
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 8s

This commit is contained in:
Methapon2001 2025-03-17 15:20:18 +07:00
parent 2f148b6f13
commit 0d002e59bd

View file

@ -57,69 +57,76 @@ export async function deleteFolder(path: string) {
export const fileLocation = { export const fileLocation = {
branch: { branch: {
line: (branchId: string) => `branch/line-qr-${branchId}`, line: (branchId: string) => `.system/branch/line-qr-${branchId}`,
bank: (branchId: string, bankId: string) => `branch/bank-qr-${branchId}-${bankId}`, bank: (branchId: string, bankId: string) => `.system/branch/bank-qr-${branchId}-${bankId}`,
img: (branchId: string, name?: string) => `branch/img-${branchId}/${name || ""}`, img: (branchId: string, name?: string) => `.system/branch/img-${branchId}/${name || ""}`,
attachment: (branchId: string, name?: string) => `branch/attachment-${branchId}/${name || ""}`, attachment: (branchId: string, name?: string) =>
`.system/branch/attachment-${branchId}/${name || ""}`,
}, },
user: { user: {
profile: (userId: string, name?: string) => `user/profile-image-${userId}/${name || ""}`, profile: (userId: string, name?: string) =>
attachment: (userId: string, name?: string) => `user/attachment-${userId}/${name || ""}`, `.system/user/profile-image-${userId}/${name || ""}`,
attachment: (userId: string, name?: string) =>
`.system/user/attachment-${userId}/${name || ""}`,
}, },
customer: { customer: {
img: (customerId: string, name?: string) => `customer/img-${customerId}/${name || ""}`, img: (customerId: string, name?: string) => `.system/customer/img-${customerId}/${name || ""}`,
}, },
customerBranch: { customerBranch: {
attachment: (customerBranchId: string, name?: string) => attachment: (customerBranchId: string, name?: string) =>
`customer-branch/attachment-${customerBranchId}/${name || ""}`, `.system/customer-branch/attachment-${customerBranchId}/${name || ""}`,
citizen: (customerBranchId: string, citizenId?: string) => citizen: (customerBranchId: string, citizenId?: string) =>
`customer-branch/citizen-${customerBranchId}/${citizenId || ""}`, `.system/customer-branch/citizen-${customerBranchId}/${citizenId || ""}`,
houseRegistration: (customerBranchId: string, houseRegistrationId?: string) => houseRegistration: (customerBranchId: string, houseRegistrationId?: string) =>
`customer-branch/house-registration-${customerBranchId}/${houseRegistrationId || ""}`, `.system/customer-branch/house-registration-${customerBranchId}/${houseRegistrationId || ""}`,
commercialRegistration: (customerBranchId: string, commercialRegistrationId?: string) => commercialRegistration: (customerBranchId: string, commercialRegistrationId?: string) =>
`customer-branch/commercial-registration-${customerBranchId}/${commercialRegistrationId || ""}`, `.system/customer-branch/commercial-registration-${customerBranchId}/${commercialRegistrationId || ""}`,
vatRegistration: (customerBranchId: string, vatRegistrationId?: string) => vatRegistration: (customerBranchId: string, vatRegistrationId?: string) =>
`customer-branch/vat-registration-${customerBranchId}/${vatRegistrationId || ""}`, `.system/customer-branch/vat-registration-${customerBranchId}/${vatRegistrationId || ""}`,
powerOfAttorney: (customerBranchId: string, powerOfAttorneyId?: string) => powerOfAttorney: (customerBranchId: string, powerOfAttorneyId?: string) =>
`customer-branch/power-of-attorney-${customerBranchId}/${powerOfAttorneyId || ""}`, `.system/customer-branch/power-of-attorney-${customerBranchId}/${powerOfAttorneyId || ""}`,
}, },
employee: { employee: {
img: (employeeId: string, name?: string) => `employee/img-${employeeId}/${name || ""}`, img: (employeeId: string, name?: string) => `.system/employee/img-${employeeId}/${name || ""}`,
attachment: (employeeId: string, name?: string) => attachment: (employeeId: string, name?: string) =>
`employee/attachment-${employeeId}/${name || ""}`, `.system/employee/attachment-${employeeId}/${name || ""}`,
visa: (employeeId: string, visaId?: string) => `employee/visa-${employeeId}/${visaId || ""}`, visa: (employeeId: string, visaId?: string) =>
`.system/employee/visa-${employeeId}/${visaId || ""}`,
passport: (employeeId: string, passportId?: string) => passport: (employeeId: string, passportId?: string) =>
`employee/passport-${employeeId}/${passportId || ""}`, `.system/employee/passport-${employeeId}/${passportId || ""}`,
inCountryNotice: (employeeId: string, noticeId?: string) => inCountryNotice: (employeeId: string, noticeId?: string) =>
`employee/in-country-notice-${employeeId}/${noticeId || ""}`, `.system/employee/in-country-notice-${employeeId}/${noticeId || ""}`,
}, },
product: { product: {
img: (productId: string, name?: string) => `product/img-${productId}/${name || ""}`, img: (productId: string, name?: string) => `.system/product/img-${productId}/${name || ""}`,
}, },
service: { service: {
img: (serviceId: string, name?: string) => `service/img-${serviceId}/${name || ""}`, img: (serviceId: string, name?: string) => `.system/service/img-${serviceId}/${name || ""}`,
}, },
quotation: { quotation: {
attachment: (quotationId: string, name?: string) => attachment: (quotationId: string, name?: string) =>
`quotation/attachment-${quotationId}/${name || ""}`, `.system/quotation/attachment-${quotationId}/${name || ""}`,
payment: (quotationId: string, paymentId: string, name?: string) => payment: (quotationId: string, paymentId: string, name?: string) =>
`quotation/payment-${quotationId}/${paymentId}/${name || ""}`, `.system/quotation/payment-${quotationId}/${paymentId}/${name || ""}`,
}, },
request: { request: {
attachment: (requestId: string, step: number, name?: string) => attachment: (requestId: string, step: number, name?: string) =>
`request/attachment-${requestId}-${step}/${name || ""}`, `.system/request/attachment-${requestId}-${step}/${name || ""}`,
}, },
institution: { institution: {
attachment: (institutionId: string, name?: string) => attachment: (institutionId: string, name?: string) =>
`institution/attachment-${institutionId}/${name || ""}`, `.system/institution/attachment-${institutionId}/${name || ""}`,
img: (institutionId: string, name?: string) => `institution/img-${institutionId}/${name || ""}`, img: (institutionId: string, name?: string) =>
`.system/institution/img-${institutionId}/${name || ""}`,
}, },
task: { task: {
attachment: (taskId: string, name?: string) => `task/attachment-${taskId}/${name || ""}`, attachment: (taskId: string, name?: string) =>
`.system/task/attachment-${taskId}/${name || ""}`,
}, },
creditNote: { creditNote: {
slip: (creditNoteId: string, name?: string) => `credit-note/slip-${creditNoteId}/${name || ""}`, slip: (creditNoteId: string, name?: string) =>
`.system/credit-note/slip-${creditNoteId}/${name || ""}`,
attachment: (creditNoteId: string, name?: string) => attachment: (creditNoteId: string, name?: string) =>
`credit-note/attachment-${creditNoteId}/${name || ""}`, `.system/credit-note/attachment-${creditNoteId}/${name || ""}`,
}, },
}; };