fix(tactical): resolve DTO types and TS1272 build error for isolatedModules

This commit is contained in:
Hamza-Ayed
2026-08-18 09:46:04 +03:00
parent bd287d155b
commit 941420f5c0
86 changed files with 3614 additions and 1556 deletions
+10 -2
View File
@@ -30,7 +30,7 @@ let GeocodingInitService = GeocodingInitService_1 = class GeocodingInitService {
try {
await this.repo.query('CREATE EXTENSION IF NOT EXISTS postgis;');
await this.repo.query('CREATE EXTENSION IF NOT EXISTS pg_trgm;');
const tables = ['places_jordan', 'places_syria', 'places_egypt'];
const tables = ['places_jordan', 'places_syria', 'places_egypt', 'places_iraq'];
const columnMapping = [
{ old: 'admin_level4_id', new: 'governorate_id' },
{ old: 'admin_level6_id', new: 'district_id' },
@@ -84,12 +84,20 @@ let GeocodingInitService = GeocodingInitService_1 = class GeocodingInitService {
CREATE TRIGGER trg_sync_place_location_egypt
BEFORE INSERT OR UPDATE ON places_egypt
FOR EACH ROW EXECUTE FUNCTION sync_place_location();
`);
await this.repo.query(`
DROP TRIGGER IF EXISTS trg_sync_place_location_iraq ON places_iraq;
CREATE TRIGGER trg_sync_place_location_iraq
BEFORE INSERT OR UPDATE ON places_iraq
FOR EACH ROW EXECUTE FUNCTION sync_place_location();
`);
await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_jordan_location ON places_jordan USING gist (location);');
await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_egypt_location ON places_egypt USING gist (location);');
await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_iraq_location ON places_iraq USING gist (location);');
await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_jordan_names_trgm ON places_jordan USING gist (name_ar gist_trgm_ops, name_en gist_trgm_ops);');
await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_egypt_names_trgm ON places_egypt USING gist (name_ar gist_trgm_ops, name_en gist_trgm_ops);');
this.logger.log('Geocoding database triggers and optimized indexes initialized for Syria, Jordan, and Egypt.');
await this.repo.query('CREATE INDEX IF NOT EXISTS idx_places_iraq_names_trgm ON places_iraq USING gist (name_ar gist_trgm_ops, name_en gist_trgm_ops);');
this.logger.log('Geocoding database triggers and optimized indexes initialized for Syria, Jordan, Egypt, and Iraq.');
}
catch (err) {
this.logger.error('Failed to initialize database geocoding triggers:', err);