feat: add core backend modules, inventory services, and patch scripts for AI Pharmacy API
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
const fs = require('fs');
|
||||
|
||||
const path = 'C:/Users/CSH12/Desktop/AI_Pharamcy_Frontend/AI_Pharmacy_Application/src/pages/Inventory.tsx';
|
||||
let content = fs.readFileSync(path, 'utf8');
|
||||
|
||||
const targetStr = `return <span className="text-slate-600 font-medium text-[14px]">{date.toLocaleDateString()}</span>;`;
|
||||
const replacementStr = `const formattedDate = isNaN(date.getTime()) ? info.getValue() : date.toLocaleDateString('en-GB', { day: '2-digit', month: '2-digit', year: 'numeric' });\n return <span className="text-slate-600 font-medium text-[14px]">{formattedDate}</span>;`;
|
||||
|
||||
if (content.includes(targetStr)) {
|
||||
content = content.replace(targetStr, replacementStr);
|
||||
fs.writeFileSync(path, content);
|
||||
console.log("SUCCESS: Replaced date.toLocaleDateString() with DD/MM/YYYY formatting!");
|
||||
} else {
|
||||
console.log("Target string not found in Inventory.tsx");
|
||||
}
|
||||
Reference in New Issue
Block a user