Skip to content

Commit

Permalink
fix import and pipes revert
Browse files Browse the repository at this point in the history
  • Loading branch information
TitoMoi committed Sep 29, 2023
1 parent 64f053b commit a51708b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/app/assigntype/pipe/assign-type-name.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
16 changes: 10 additions & 6 deletions src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "" });
Expand All @@ -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);
}
});

Expand Down
1 change: 0 additions & 1 deletion src/app/room/pipe/room-name.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
24 changes: 12 additions & 12 deletions src/assets/source/assignType.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"hasAssistant": false,
"repeat": false,
"type": "publicSpeech",
"order": 1,
"order": 10,
"color": "#4B6DA6",
"days": null
},
Expand All @@ -17,7 +17,7 @@
"hasAssistant": false,
"repeat": false,
"type": "initialPrayer",
"order": 2,
"order": 20,
"color": "#ffffff",
"days": null
},
Expand All @@ -28,7 +28,7 @@
"hasAssistant": false,
"repeat": false,
"type": "treasures",
"order": 3,
"order": 30,
"color": "#616261",
"days": null
},
Expand All @@ -39,7 +39,7 @@
"hasAssistant": false,
"repeat": false,
"type": "spiritualGems",
"order": 4,
"order": 40,
"color": "#616261",
"days": null
},
Expand All @@ -50,7 +50,7 @@
"hasAssistant": false,
"repeat": false,
"type": "bibleReading",
"order": 5,
"order": 50,
"color": "#616261",
"days": null
},
Expand All @@ -61,7 +61,7 @@
"hasAssistant": true,
"repeat": true,
"type": "initialCall",
"order": 6,
"order": 60,
"color": "#C48430",
"days": null
},
Expand All @@ -72,7 +72,7 @@
"hasAssistant": false,
"repeat": false,
"type": "talk",
"order": 7,
"order": 70,
"color": "#C48430",
"days": null
},
Expand All @@ -83,7 +83,7 @@
"hasAssistant": true,
"repeat": true,
"type": "returnVisit",
"order": 8,
"order": 80,
"color": "#C48430",
"days": null
},
Expand All @@ -94,7 +94,7 @@
"hasAssistant": true,
"repeat": false,
"type": "bibleStudy",
"order": 9,
"order": 90,
"color": "#C48430",
"days": null
},
Expand All @@ -105,7 +105,7 @@
"hasAssistant": false,
"repeat": true,
"type": "livingAsChristians",
"order": 10,
"order": 100,
"color": "#942827",
"days": null
},
Expand All @@ -116,7 +116,7 @@
"hasAssistant": true,
"repeat": false,
"type": "congregationBibleStudy",
"order": 11,
"order": 110,
"color": "#942827",
"days": null
},
Expand All @@ -127,7 +127,7 @@
"hasAssistant": false,
"repeat": false,
"type": "endingPrayer",
"order": 12,
"order": 120,
"color": "#ffffff",
"days": null
}
Expand Down
6 changes: 3 additions & 3 deletions src/assets/source/room.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]

0 comments on commit a51708b

Please sign in to comment.