feat(representation): add welcome SMS notification for newly added doctors and clinics by representatives
This commit is contained in:
@@ -629,6 +629,8 @@ export default function AppointmentsPage() {
|
||||
|
||||
// ── Handle slot click → open booking modal
|
||||
function handleSlotClick(slot: SlotItem) {
|
||||
// نماینده اجازهی ثبت نوبت ندارد؛ صفحه برای او فقط مشاهده است.
|
||||
if (isRepresentation) return;
|
||||
const doctorName = doctors.find(d => d.uuid === selectedDoctorUuid)?.name ?? '';
|
||||
setBookingHint(false);
|
||||
setBookingSlot({
|
||||
@@ -677,19 +679,21 @@ export default function AppointmentsPage() {
|
||||
padding: '12px 16px', borderBottom: '1px solid var(--border)',
|
||||
display: 'flex', alignItems: 'center', gap: 10, flexWrap: 'wrap',
|
||||
}}>
|
||||
{/* New appointment button */}
|
||||
<button
|
||||
className="btn primary sm"
|
||||
onClick={() => {
|
||||
if (!selectedDoctorUuid) { toast.error('ابتدا یک پزشک انتخاب کنید'); return; }
|
||||
setViewMode('schedule');
|
||||
setBookingHint(true);
|
||||
}}
|
||||
style={{ display: 'flex', alignItems: 'center', gap: 5 }}
|
||||
>
|
||||
<PlusIcon style={{ width: 15, height: 15 }} />
|
||||
نوبت جدید
|
||||
</button>
|
||||
{/* New appointment button — نماینده اجازهی ثبت ندارد */}
|
||||
{!isRepresentation && (
|
||||
<button
|
||||
className="btn primary sm"
|
||||
onClick={() => {
|
||||
if (!selectedDoctorUuid) { toast.error('ابتدا یک پزشک انتخاب کنید'); return; }
|
||||
setViewMode('schedule');
|
||||
setBookingHint(true);
|
||||
}}
|
||||
style={{ display: 'flex', alignItems: 'center', gap: 5 }}
|
||||
>
|
||||
<PlusIcon style={{ width: 15, height: 15 }} />
|
||||
نوبت جدید
|
||||
</button>
|
||||
)}
|
||||
|
||||
{/* View toggle */}
|
||||
<div style={{
|
||||
@@ -752,7 +756,7 @@ export default function AppointmentsPage() {
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
{bookingHint && (
|
||||
{bookingHint && !isRepresentation && (
|
||||
<div style={{
|
||||
display: 'flex', alignItems: 'center', gap: 10, marginBottom: 12,
|
||||
padding: '10px 16px', borderRadius: 'var(--r-sm)',
|
||||
|
||||
Reference in New Issue
Block a user