diff --git a/src/app/assigntype/pipe/assign-type-name.pipe.ts b/src/app/assigntype/pipe/assign-type-name.pipe.ts index fef6cecf..6c1f2b40 100644 --- a/src/app/assigntype/pipe/assign-type-name.pipe.ts +++ b/src/app/assigntype/pipe/assign-type-name.pipe.ts @@ -14,7 +14,6 @@ export class AssignTypeNamePipe implements PipeTransform { constructor(private translocoService: TranslocoService) {} transform(at: AssignTypeInterface): string { - if (!at) return this.translocoService.translate("ASSIGNTYPE_UNKNOWN"); return at.name ? at.name : this.translocoService.translate(at.tKey); } } diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts index afdb249f..86a1c4aa 100644 --- a/src/app/home/home.component.ts +++ b/src/app/home/home.component.ts @@ -80,9 +80,9 @@ export class HomeComponent { /** Uploads servihelper files, only for OFFLINE */ uploadZipFiles(event: Event) { const zipFile = this.getZipContentFromFileEvent(event); - let zip = new AdmZip(); - zip = zip.readFile(zipFile.path); - /* const zip = new AdmZip(zipFile.path); */ + /* let zip = new AdmZip(); + zip = zip.readFile(zipFile.path); */ + const zip = new AdmZip(zipFile.path); //First of all prepare the paths, online file is already available this.configService.prepareFilePaths({ isOnline: false, path: "" }); @@ -98,10 +98,14 @@ export class HomeComponent { writeJsonSync(this.configService.configPath, finalConfig); break; default: - writeFileSync( - path.join(this.configService.sourceFilesPath, zipEntry.entryName), - zipEntry.getData().toString("utf8") + const resolvedPath = path.join( + this.configService.sourceFilesPath, + zipEntry.entryName ); + const data = (zipEntry.entryName as string).endsWith(".gz") + ? zipEntry.getData() + : zipEntry.getData().toString("utf8"); + writeFileSync(resolvedPath, data); } }); diff --git a/src/app/room/pipe/room-name.pipe.ts b/src/app/room/pipe/room-name.pipe.ts index 9fa0bf55..ddc92a7f 100644 --- a/src/app/room/pipe/room-name.pipe.ts +++ b/src/app/room/pipe/room-name.pipe.ts @@ -14,7 +14,6 @@ export class RoomNamePipe implements PipeTransform { constructor(private translocoService: TranslocoService) {} transform(r: RoomInterface): string { - if (!r) return this.translocoService.translate("ROOM_UNKNOWN"); return r.name ? r.name : this.translocoService.translate(r.tKey); } } diff --git a/src/assets/source/assignType.json b/src/assets/source/assignType.json index c9accef6..3272cead 100644 --- a/src/assets/source/assignType.json +++ b/src/assets/source/assignType.json @@ -6,7 +6,7 @@ "hasAssistant": false, "repeat": false, "type": "publicSpeech", - "order": 1, + "order": 10, "color": "#4B6DA6", "days": null }, @@ -17,7 +17,7 @@ "hasAssistant": false, "repeat": false, "type": "initialPrayer", - "order": 2, + "order": 20, "color": "#ffffff", "days": null }, @@ -28,7 +28,7 @@ "hasAssistant": false, "repeat": false, "type": "treasures", - "order": 3, + "order": 30, "color": "#616261", "days": null }, @@ -39,7 +39,7 @@ "hasAssistant": false, "repeat": false, "type": "spiritualGems", - "order": 4, + "order": 40, "color": "#616261", "days": null }, @@ -50,7 +50,7 @@ "hasAssistant": false, "repeat": false, "type": "bibleReading", - "order": 5, + "order": 50, "color": "#616261", "days": null }, @@ -61,7 +61,7 @@ "hasAssistant": true, "repeat": true, "type": "initialCall", - "order": 6, + "order": 60, "color": "#C48430", "days": null }, @@ -72,7 +72,7 @@ "hasAssistant": false, "repeat": false, "type": "talk", - "order": 7, + "order": 70, "color": "#C48430", "days": null }, @@ -83,7 +83,7 @@ "hasAssistant": true, "repeat": true, "type": "returnVisit", - "order": 8, + "order": 80, "color": "#C48430", "days": null }, @@ -94,7 +94,7 @@ "hasAssistant": true, "repeat": false, "type": "bibleStudy", - "order": 9, + "order": 90, "color": "#C48430", "days": null }, @@ -105,7 +105,7 @@ "hasAssistant": false, "repeat": true, "type": "livingAsChristians", - "order": 10, + "order": 100, "color": "#942827", "days": null }, @@ -116,7 +116,7 @@ "hasAssistant": true, "repeat": false, "type": "congregationBibleStudy", - "order": 11, + "order": 110, "color": "#942827", "days": null }, @@ -127,7 +127,7 @@ "hasAssistant": false, "repeat": false, "type": "endingPrayer", - "order": 12, + "order": 120, "color": "#ffffff", "days": null } diff --git a/src/assets/source/room.json b/src/assets/source/room.json index d55ddb06..3bddceb0 100644 --- a/src/assets/source/room.json +++ b/src/assets/source/room.json @@ -4,20 +4,20 @@ "name": "", "tKey": "ROOMTYPES_MAINHALL", "type": "mainHall", - "order": 1 + "order": 10 }, { "id": "2", "name": "", "tKey": "ROOMTYPES_AUXILIARYROOM1", "type": "auxiliaryRoom1", - "order": 2 + "order": 20 }, { "id": "3", "name": "", "tKey": "ROOMTYPES_AUXILIARYROOM2", "type": "auxiliaryRoom2", - "order": 3 + "order": 30 } ]