medtrackrx / script.js
Surae007's picture
เขียน wesite ภาษาไทย สำหรับ โปรแกรมในการจัดทำข้อมูลการเบิกยา และการจ่ายยากลุ่มยา จ 2 ให้กับผู้ป่วยในโรงพยาบาล โดยคุณโดยตั้งแต่ในขั้นตอน การส่งเอกสารเบิกยา ขั้นตอนกำลังอนุมัติ อนุมัติแล้ว ติดต่อคนไข้แล้ว จ่ายยาแล้ว และมีระบบ feature เพิ่มเติมจากที่คุณติดว่าเหมาะสมมากที่สุด ครอบคลุมที่สุดเท่าที่จะเป็นไปได้ จงจัดทำให้ฉันระดับ masterpiece
cdacbba verified
// Shared functions across all pages
// Initialize tooltips
function initTooltips() {
const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'));
tooltipTriggerList.map(function (tooltipTriggerEl) {
return new bootstrap.Tooltip(tooltipTriggerEl);
});
}
// Format Thai date
function formatThaiDate(dateString) {
if (!dateString) return '';
const date = new Date(dateString);
const options = { day: 'numeric', month: 'numeric', year: 'numeric' };
return date.toLocaleDateString('th-TH', options);
}
// Toggle mobile menu
function toggleMobileMenu() {
const mobileMenu = document.getElementById('mobile-menu');
mobileMenu.classList.toggle('hidden');
}
// Initialize the app
document.addEventListener('DOMContentLoaded', function() {
initTooltips();
// Set current year in footer
document.getElementById('current-year').textContent = new Date().getFullYear() + 543;
console.log('MedTrackRx initialized');
});