-เชื่อมโยง api search กับ frontend

-ปรับปรุงระบบ state
-เพิ่ม ระบบ pipe dtmtodatetime
This commit is contained in:
2025-11-13 18:00:51 +07:00
parent f27389da29
commit 3cc4a4a632
9 changed files with 121 additions and 23 deletions

View File

@@ -0,0 +1,24 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'dtmtodatetime',
standalone: false
})
export class AccDateFormatPipe implements PipeTransform {
transform(value: string | number): string {
if (value === null || value === undefined) return '';
const str = value.toString();
if (str.length !== 12) return str;
const dd = str.slice(0, 2);
const mm = str.slice(2, 4);
const yyyy = str.slice(4, 8);
const hh = str.slice(8, 10);
const min = str.slice(10, 12);
return `${dd}/${mm}/${yyyy} ${hh}:${min}`;
}
}