48 lines
1.4 KiB
JavaScript
48 lines
1.4 KiB
JavaScript
/**
|
|
* ConfigManager: Central configuration for multi-tenant hospital settings and white-labeling.
|
|
*/
|
|
|
|
class ConfigManager {
|
|
constructor() {
|
|
this.tenants = {
|
|
'default': {
|
|
name: "Curio Clinic",
|
|
logo: "C",
|
|
primaryColor: "#0F172A",
|
|
secondaryColor: "#38BDF8",
|
|
consultationFee: 500,
|
|
currency: "₹"
|
|
},
|
|
'sharma-clinic': {
|
|
name: "Dr. Sharma's Cardiology",
|
|
logo: "S",
|
|
primaryColor: "#1E3A8A", // Deep Blue
|
|
secondaryColor: "#60A5FA",
|
|
consultationFee: 800,
|
|
currency: "₹"
|
|
},
|
|
'apollo-hospitals': {
|
|
name: "Apollo Multispecialty",
|
|
logo: "A",
|
|
primaryColor: "#065F46", // Dark Green
|
|
secondaryColor: "#34D399",
|
|
consultationFee: 1200,
|
|
currency: "₹"
|
|
}
|
|
};
|
|
}
|
|
|
|
getTenantConfig(tenantId) {
|
|
return this.tenants[tenantId] || this.tenants['default'];
|
|
}
|
|
|
|
updateTenantConfig(tenantId, newConfig) {
|
|
if (!this.tenants[tenantId]) {
|
|
this.tenants[tenantId] = { ...this.tenants['default'] };
|
|
}
|
|
this.tenants[tenantId] = { ...this.tenants[tenantId], ...newConfig };
|
|
}
|
|
}
|
|
|
|
module.exports = new ConfigManager();
|