Merge pull request 'fix(admin): lock module category editing to preserve core Complete Pack entitlements' (#48) from fix/lock-module-category-edit into main

Reviewed-on: https://git.zedobject.local/AcuPedia/acupedia-web-ui/pulls/48
Reviewed-by: Amit Salunke <amit@noreply.localhost>
This commit is contained in:
Amit Salunke 2026-11-27 04:50:13 +00:00
commit e05e1e4f0f
2 changed files with 9 additions and 13 deletions

View File

@ -1288,7 +1288,6 @@ export default function App() {
saving={editModuleSaving} saving={editModuleSaving}
onNameChange={setEditModuleName} onNameChange={setEditModuleName}
onDescriptionChange={setEditModuleDesc} onDescriptionChange={setEditModuleDesc}
onCategoryChange={setEditModuleCategory}
onSave={handleSaveModuleDetails} onSave={handleSaveModuleDetails}
onClose={() => setSelectedEditModule(null)} onClose={() => setSelectedEditModule(null)}
/> />

View File

@ -11,7 +11,6 @@ interface EditModuleModalProps {
saving: boolean; saving: boolean;
onNameChange: (val: string) => void; onNameChange: (val: string) => void;
onDescriptionChange: (val: string) => void; onDescriptionChange: (val: string) => void;
onCategoryChange: (val: string) => void;
onSave: (e: React.FormEvent) => void; onSave: (e: React.FormEvent) => void;
onClose: () => void; onClose: () => void;
} }
@ -24,7 +23,6 @@ export const EditModuleModal: React.FC<EditModuleModalProps> = ({
saving, saving,
onNameChange, onNameChange,
onDescriptionChange, onDescriptionChange,
onCategoryChange,
onSave, onSave,
onClose, onClose,
}) => { }) => {
@ -69,17 +67,16 @@ export const EditModuleModal: React.FC<EditModuleModalProps> = ({
<div> <div>
<label className="block text-[10px] uppercase font-bold text-slate-500 mb-1">Category</label> <label className="block text-[10px] uppercase font-bold text-slate-500 mb-1">Category</label>
<select <input
type="text"
readOnly
disabled
value={normalizeCategory(category)} value={normalizeCategory(category)}
onChange={(e) => onCategoryChange(e.target.value)} className="w-full bg-slate-50 border border-slate-200 rounded-xl px-3 py-2 text-xs font-bold text-slate-500 cursor-not-allowed"
className="w-full bg-white border border-slate-200 rounded-xl px-3 py-2 text-xs font-bold text-slate-800 focus:outline-none focus:border-indigo-500 cursor-pointer" />
> <p className="text-[10px] text-slate-400 mt-1">
<option value="Points">Points</option> Category is fixed to keep core Complete Pack entitlements consistent. Use Plans &amp; Pricing to create custom combo bundles.
<option value="Patterns">Patterns</option> </p>
<option value="Nutrition">Nutrition</option>
<option value="Therapeutics">Therapeutics</option>
<option value="General">General</option>
</select>
</div> </div>
<div> <div>