Skip to content

Commit

Permalink
✔ Revert Back ~
Browse files Browse the repository at this point in the history
  • Loading branch information
bifeldy committed Dec 25, 2023
1 parent baa85b3 commit 7b0d711
Show file tree
Hide file tree
Showing 12 changed files with 32 additions and 20 deletions.
1 change: 0 additions & 1 deletion dist/fansubid/browser/580.0f9cb88e8783e166.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/fansubid/browser/580.44a9841e88965361.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/fansubid/browser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<noscript>🎉 Harap Menyalakan JavaScript Untuk Dapat Mengakses Website Ini ✨</noscript>
</div>
<app-root></app-root>
<script src="runtime.d8b25f854cbbf0b2.js" type="module"></script><script src="polyfills.bbae203fdd01cf64.js" type="module"></script><script src="scripts.25bb5de51afc8a05.js" defer></script><script src="main.133bc6c7ab5e3ec9.js" type="module"></script>
<script src="runtime.d4d683d44d4a68fc.js" type="module"></script><script src="polyfills.bbae203fdd01cf64.js" type="module"></script><script src="scripts.25bb5de51afc8a05.js" defer></script><script src="main.133bc6c7ab5e3ec9.js" type="module"></script>


</body></html>
16 changes: 8 additions & 8 deletions dist/fansubid/browser/ngsw.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"configVersion": 1,
"timestamp": 1703509236437,
"timestamp": 1703512092993,
"index": "/index.html",
"assetGroups": [
{
Expand All @@ -26,9 +26,9 @@
"/478.0db131af87a9272d.js",
"/534.e1d12d955b99d1c5.js",
"/58.b96493ff0355f14f.js",
"/580.0f9cb88e8783e166.js",
"/580.44a9841e88965361.js",
"/628.b8bdb826fd1c3eac.js",
"/635.e852fab30ab5cbb7.js",
"/635.8681da4a49f2857b.js",
"/650.37453a8a19e9c5c9.js",
"/734.a7c5f1fb491aa512.js",
"/750.1935970b399a83d9.js",
Expand All @@ -45,7 +45,7 @@
"/main.133bc6c7ab5e3ec9.js",
"/manifest.webmanifest",
"/polyfills.bbae203fdd01cf64.js",
"/runtime.d8b25f854cbbf0b2.js",
"/runtime.d4d683d44d4a68fc.js",
"/scripts.25bb5de51afc8a05.js",
"/styles.42ba4bdc16b8e6eb.css"
],
Expand Down Expand Up @@ -101,9 +101,9 @@
"/478.0db131af87a9272d.js": "927cba8d9b508086537e7818bf33ff406aa6a27b",
"/534.e1d12d955b99d1c5.js": "d3c00077532e6d9bffb29310ca2ca7f5ef7220be",
"/58.b96493ff0355f14f.js": "33225d8d0cb89517168159125151fcb59f5a8d5a",
"/580.0f9cb88e8783e166.js": "5e01e85997a05b22b9bda67ccb8bb05d3c328bfa",
"/580.44a9841e88965361.js": "3a99c5b6c6eda4f11e5e4ef20551648d1964db06",
"/628.b8bdb826fd1c3eac.js": "e88618cc4f1fa66b5ca8a58bfc24bef828469321",
"/635.e852fab30ab5cbb7.js": "77d104dfdae80fcbdea4f2fb2ed497aa3641f181",
"/635.8681da4a49f2857b.js": "b42699713f0deb247ddbb3c5ba845326fc388883",
"/650.37453a8a19e9c5c9.js": "b9fcdbb5c878b941427a25a4cf9c883324e31dce",
"/734.a7c5f1fb491aa512.js": "84e5859780d38aba5e11c104461fde2f805504d1",
"/750.1935970b399a83d9.js": "d5a99cc962ab6ea65d694f2dcfe8f60a5b50264d",
Expand All @@ -116,11 +116,11 @@
"/960.1e1fe3434266e9a4.js": "c649bd883373fc66f7e2781d27054b5da57413a3",
"/common.698fd424c1ae0657.js": "46b346a739b76049a55c209a473d9bbdd6c4568f",
"/favicon.ico": "071facb8fab2e4b3493dcfbb0b02d7bd21bca97e",
"/index.html": "22d1db5627445899ffa938bf4223f17547a43513",
"/index.html": "b93a97719b2965f61a4d7b86f395b17f0b728351",
"/main.133bc6c7ab5e3ec9.js": "8a23c1f1870815e1442e3605329023c66c56c8a6",
"/manifest.webmanifest": "eafb5426cdc9fd714787e5453af315b9972875a3",
"/polyfills.bbae203fdd01cf64.js": "a59f17cf29cb649f708d7ec7aa6b7247712859e1",
"/runtime.d8b25f854cbbf0b2.js": "a7b60fe725bb28446364cf7e130089e8913e5c8a",
"/runtime.d4d683d44d4a68fc.js": "ae1f51f40f1c64e2532f5bfc0cdc4fe5bfddd5d7",
"/scripts.25bb5de51afc8a05.js": "61d71afde3d3c58daff9d6801601386596732294",
"/styles.42ba4bdc16b8e6eb.css": "907626806a39a9a82712353a7576e277e46d03ab"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/fansubid/server/main.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/api/controllers/berkas.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ export class BerkasController {
try {
if (
'name' in req.body && 'projectType_id' in req.body &&
('anime_id' in req.body || 'dorama_id' in req.body) &&
('anime_id' in req.body || 'dorama_id' in req.body || 'sn_code' in req.body) &&
('fansub_id' in req.body && Array.isArray(req.body.fansub_id) && req.body.fansub_id.length > 0)
) {
const user: UserModel = res.locals['user'];
Expand Down Expand Up @@ -404,7 +404,7 @@ export class BerkasController {
.setDescription(this.gs.htmlToText(resFileSave.description))
.addField(
(resFileSave.anime_ ? 'Anime' : (resFileSave.dorama_ ? 'Dorama' : 'Film Lainnya')),
(resFileSave.anime_ ? resFileSave.anime_.name : (resFileSave.dorama_ ? resFileSave.dorama_.name : resFileSave.sn_code || 'ー')),
(resFileSave.anime_ ? resFileSave.anime_.name : (resFileSave.dorama_ ? resFileSave.dorama_.name : resFileSave.sn_code)),
false
)
.addFields(
Expand Down Expand Up @@ -745,7 +745,7 @@ export class BerkasController {
.setDescription(this.gs.htmlToText(resFileSave.description))
.addField(
(resFileSave.anime_ ? 'Anime' : (resFileSave.dorama_ ? 'Dorama' : 'Film Lainnya')),
(resFileSave.anime_ ? resFileSave.anime_.name : (resFileSave.dorama_ ? resFileSave.dorama_.name : resFileSave.sn_code || 'ー')),
(resFileSave.anime_ ? resFileSave.anime_.name : (resFileSave.dorama_ ? resFileSave.dorama_.name : resFileSave.sn_code)),
false
)
.addFields(
Expand Down
8 changes: 7 additions & 1 deletion src/app/_pages/berkas/berkas-edit/berkas-edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,18 @@ <h2 class="pt-3 border-bottom-dotted">
<ng-template #notDorama_>
<mat-form-field appearance="outline" class="py-3 col-12" *ngIf="berkasType" [color]="'accent'">
<mat-label>Kode / Serial Number</mat-label>
<input matInput formControlName="sn_code" placeholder="XXX-999" />
<input matInput formControlName="sn_code" placeholder="XXX-999" required />
<mat-icon fontIcon="tag" matSuffix></mat-icon>
<mat-error>
<div *ngIf="fg.get('sn_code').hasError('required')">Kode Serial Tidak Boleh Kosong</div>
<div *ngIf="fg.get('sn_code').hasError('pattern')">Kode Serial Hanya Boleh Huruf Besar, Strip, Dan Angka</div>
</mat-error>
</mat-form-field>
<div class="col-12 px-3">
<small class="text-success">
* Jika tidak ada kode serial isi saja - strip
</small>
</div>
</ng-template>
</ng-template>
<div class="col-12 py-3">
Expand Down
2 changes: 1 addition & 1 deletion src/app/_pages/berkas/berkas-edit/berkas-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ export class BerkasEditComponent implements OnInit, OnDestroy {
this.subsDoramaDetail?.unsubscribe();
this.doramaValueChanged();
} else {
this.fg.controls['sn_code'].setValidators([Validators.pattern(/^[A-Z0-9\-]+$/)]);
this.fg.controls['sn_code'].setValidators([Validators.required, Validators.pattern(/^[A-Z0-9\-]+$/)]);
}
}
this.fg.controls['anime_id'].updateValueAndValidity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,18 @@ <h2 class="pt-3 border-bottom-dotted">
<ng-template #notDorama_>
<mat-form-field appearance="outline" class="py-3 col-12" *ngIf="berkasType" [color]="'accent'">
<mat-label>Kode / Serial Number</mat-label>
<input matInput formControlName="sn_code" placeholder="XXX-999" />
<input matInput formControlName="sn_code" placeholder="XXX-999" required />
<mat-icon fontIcon="tag" matSuffix></mat-icon>
<mat-error>
<div *ngIf="fg.get('sn_code').hasError('required')">Kode Serial Tidak Boleh Kosong</div>
<div *ngIf="fg.get('sn_code').hasError('pattern')">Kode Serial Hanya Boleh Huruf Besar, Strip, Dan Angka</div>
</mat-error>
</mat-form-field>
<div class="col-12 px-3">
<small class="text-success">
* Jika tidak ada kode serial isi saja - strip
</small>
</div>
</ng-template>
</ng-template>
<div class="col-12 py-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export class BerkasCreateComponent implements OnInit, OnDestroy, CanComponentDea
this.subsDoramaDetail?.unsubscribe();
this.doramaValueChanged();
} else {
this.fg.controls['sn_code'].setValidators([Validators.pattern(/^[A-Z0-9\-]+$/)]);
this.fg.controls['sn_code'].setValidators([Validators.required, Validators.pattern(/^[A-Z0-9\-]+$/)]);
}
}
this.fg.controls['anime_id'].updateValueAndValidity();
Expand Down

0 comments on commit 7b0d711

Please sign in to comment.