Refactor technical status workflow

Replace the legacy timeline status modal with a technical-status editor that supports multiple date intervals and descriptive notes. Update task views to use the new Update Technical Status action, normalize status-history parsing for array-based date records, and improve badge formatting for technical stages like SIT, UAT, PTR, Go-Live, and BAST.
This commit is contained in:
Ichsan Kurniawan
2026-10-09 18:37:26 +07:00
parent 98ce715ac6
commit f07990a3fb
12 changed files with 660 additions and 228 deletions
+11 -2
View File
@@ -16,16 +16,25 @@ export function formatStatusText(status?: any): string {
if (!trimmed) return "";
// Tetap UPPERCASE jika seluruh teks status hanya 3 huruf (SIT, UAT, PTR, dll) atau akronim BAST
const upperAcronyms = new Set(["SIT", "UAT", "PTR", "BAST", "POC", "WIP", "WO", "IM"]);
const upperAcronyms = new Set([
"SIT", "UAT", "PTR", "BAST", "POC", "WIP", "WO", "IM",
"(SIT)", "(UAT)", "(PTR)", "(BAST)"
]);
if (trimmed.length === 3 || upperAcronyms.has(trimmed.toUpperCase())) {
return trimmed.toUpperCase();
}
// Capitalize setiap kata untuk teks status lainnya
// Capitalize setiap kata untuk teks status lainnya dengan memperhatikan akronim teknis
return trimmed
.split(/\s+/)
.map(word => {
if (!word) return "";
if (word.toUpperCase() === "GO-LIVE" || word.toLowerCase() === "go-live") return "Go-Live";
if (word === "&") return "&";
const stripped = word.replace(/[^a-zA-Z]/g, '').toUpperCase();
if (upperAcronyms.has(stripped) || upperAcronyms.has(word.toUpperCase())) {
return word.toUpperCase();
}
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
})
.join(" ");
+21 -4
View File
@@ -57,11 +57,28 @@ export const STATUS_BADGE_MAP: Record<string, VariantProps<typeof badgeVariants>
"issue": "statusDanger",
"canceled": "statusDanger",
"sit": "statusTesting",
"uat": "statusTesting",
"ptr": "statusTesting",
// Technical progression stages
"development": "info",
"bast": "statusSuccess", // Handover/Sign-off
"sit": "statusTesting",
"system integration testing (sit)": "statusTesting",
"system integration testing": "statusTesting",
"uat": "violet",
"user acceptance testing (uat)": "violet",
"user acceptance testing": "violet",
"ptr": "statusWarning",
"production trial run (ptr)": "statusWarning",
"production trial run": "statusWarning",
"go-live": "statusSuccess",
"go live": "statusSuccess",
"golive": "statusSuccess",
"bast": "statusActive",
"project handover & bast": "statusActive",
"project handover and bast": "statusActive",
"warranty": "statusMaintenance",