Files
edr-platform/apps/edr-freight-api/src/scripts/seed-file-upload-settings.ts
Marshal 54587a8c55 feat: add nationality selection and business license upload functionality
- Introduced a new step in the onboarding process to select company nationality (Ethiopian or Foreign).
- Updated API and service layers to handle nationality data for companies.
- Added support for uploading multiple business license files for each operational profile.
- Refactored company and forwarder forms to include new license upload step.
- Created a reusable RoleLicenseStep component for managing license file uploads.
- Implemented utility functions for phone number handling.
- Added migrations to update the database schema for nationality and business license files.
2026-06-20 08:28:01 +00:00

24 lines
747 B
TypeScript

import { AppDataSource } from "../data-source";
import { FileUploadSettingsSeeder } from "../seed/file-upload-settings.seeder";
/**
* Idempotently (re)seed the company onboarding file-upload settings, including
* the nationality-based document sets (ethiopian / foreign). Run on demand:
* pnpm --filter @edr/freight-api seed:file-upload-settings
*/
async function run() {
await AppDataSource.initialize();
try {
const seeder = new FileUploadSettingsSeeder(AppDataSource);
await seeder.run();
console.log("Seeded company onboarding file-upload settings.");
} finally {
await AppDataSource.destroy();
}
}
run().catch((error) => {
console.error("Failed to seed file-upload settings:", error);
process.exit(1);
});