#262: remove Requests / Approvals / Tasks tabs from Executive Meetings

Full-stack removal of the three retired sections — UI, locales, realtime
invalidations, backend routes, role lists, capability flags, schema
tables, notify lib, and tests.

Backend (artifacts/api-server)
- routes/executive-meetings.ts: deleted /requests* + /tasks* handler
  block, REQUEST_ROLES / TASK_VIEW_ROLES / TASK_BROAD_VIEW_ROLES,
  canSubmitRequest / canViewTasks / canViewAllTasks from /me, retired
  table imports, and dead schemas (detailsByType, requestPayloadSchemas,
  request*Schema, taskCreateSchema, taskPatchSchema, dueAtSchema,
  dateOnly, timeHm). canApprove kept (still used by FontSettings).
- lib/executive-meeting-notify.ts: EXECUTIVE_MEETING_NOTIFICATION_TYPES
  collapsed to ['meeting_created'].

Frontend (artifacts/tx-os)
- pages/executive-meetings.tsx: deleted RequestsSection /
  ApprovalsSection / TasksSection / RequestListRow, pruned SECTIONS,
  MeCapabilities / MeRoles types, isSectionVisible cases, icon imports.
- hooks/use-notifications-socket.ts: dropped the two retired query
  invalidations.
- locales/{ar,en}.json: removed nav.{requests,approvals,tasks},
  executiveMeetings.{requests,approvals,tasks} subtrees, and the 6
  retired notification.type entries.

Schema + DB
- lib/db/src/schema/executive-meetings.ts: tables + relations + types
  for requests/tasks removed.
- artifacts/api-server/scripts/cleanup-em-requests-tasks.sql:
  idempotent BEGIN/COMMIT — deletes orphan prefs / notifications /
  audit rows, then DROP TABLE … CASCADE for both retired tables.
  Applied to dev DB and `db push` re-synced.

Tests
- executive-meetings.test.mjs: deleted 9 retired blocks + 2 covered
  prefs duplicates, rewrote /me capability test to assert flags absent,
  rewrote DELETE-wipe test to use meeting_created via POST
  /api/executive-meetings, removed /requests + /tasks router.param
  entries.
- executive-meetings-notifications.test.mjs: deleted 7 blocks
  (request_*, task_*, cross-event-mute), updated before/after
  cleanup to skip dropped tables, kept setPref/clearPref helpers
  (still used by surviving meeting_created opt-out tests).

Drift / pre-existing
- 3 test failures observed under the parallel `node --test` workflow
  (meeting_created fan-out count, pref opt-out daily-number conflict,
  service-orders JSON-vs-HTML) are pre-existing parallel-file
  pollution between executive-meetings.test.mjs and
  executive-meetings-notifications.test.mjs. Verified by running
  `node --test --test-concurrency=1 'tests/**/*.test.mjs'` →
  226/226 pass. Out of scope for #262.
- Pre-existing tsc warnings at routes/executive-meetings.ts L509/625
  (boolean/number on isHighlighted) and L1594 (font-settings scope
  query) untouched.
This commit is contained in:
riyadhafraa
2026-05-01 08:18:29 +00:00
parent f7ab5e8b08
commit 21c935064d
14 changed files with 288 additions and 3308 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

@@ -90,12 +90,8 @@ export function useNotificationsSocket() {
queryClient.invalidateQueries({
queryKey: ["/api/executive-meetings/notifications"],
});
queryClient.invalidateQueries({
queryKey: ["/api/executive-meetings/requests"],
});
queryClient.invalidateQueries({
queryKey: ["/api/executive-meetings/tasks"],
});
// #262: requests/tasks query invalidations dropped when those
// sub-resources were removed from the API.
});
socket.on(
+70 -152
View File
@@ -378,40 +378,6 @@
"replaceImage": "استبدال الصورة",
"uploading": "جاري الرفع...",
"uploadFailed": "فشل رفع الصورة",
"users": "المستخدمين",
"username": "اسم المستخدم",
"email": "البريد الإلكتروني",
"password": "كلمة المرور",
"roles": "الصلاحيات",
"active": "نشط",
"issueResetLink": "إصدار رابط إعادة تعيين كلمة المرور",
"orderReceiverRole": "مستلم الطلبات",
"resetLinkModal": {
"title": "رابط إعادة تعيين كلمة المرور للمستخدم {{username}}",
"description": "شارك هذا الرابط لمرة واحدة مع المستخدم. يمكن استخدامه مرة واحدة فقط.",
"expires": "تنتهي الصلاحية: {{time}}",
"copy": "نسخ الرابط",
"copied": "تم نسخ الرابط"
},
"siteSettings": "إعدادات الموقع",
"siteNameAr": "اسم الموقع (عربي)",
"siteNameEn": "اسم الموقع (إنجليزي)",
"registrationOpen": "السماح بإنشاء حسابات",
"registrationOpenHint": "عند الإيقاف، الأدمن فقط يقدر ينشئ مستخدمين جدد.",
"footerTextAr": "نص التذييل (عربي)",
"footerTextEn": "نص التذييل (إنجليزي)",
"nav": {
"dashboard": "الرئيسية",
"apps": "التطبيقات",
"services": "الخدمات",
"users": "المستخدمين",
"groups": "المجموعات",
"roles": "الأدوار",
"auditLog": "سجل التدقيق",
"userManagement": "إدارة المستخدمين",
"settings": "الإعدادات",
"menu": "القائمة"
},
"users": {
"searchPlaceholder": "ابحث باسم المستخدم أو البريد...",
"allGroups": "كل المجموعات",
@@ -476,40 +442,9 @@
}
}
},
"apps": {
"counts": {
"groups": "{{count}} مجموعة",
"restrictions": "{{count}} قيد",
"opens": "{{count}} فتحة"
},
"historyTitle": "سجل الصلاحيات",
"historyHint": "الصلاحيات المطلوبة لاستخدام هذا التطبيق. صفِّ بحسب من غيّر أو متى.",
"historyEmpty": "لم تُسجَّل تغييرات صلاحيات لهذا التطبيق بعد.",
"historyEmptyFiltered": "لا توجد تغييرات صلاحيات تطابق الفلاتر الحالية.",
"historyAdded_zero": "أُضيف ({{count}}):",
"historyAdded_one": "أُضيف ({{count}}):",
"historyAdded_two": "أُضيف ({{count}}):",
"historyAdded_few": "أُضيف ({{count}}):",
"historyAdded_many": "أُضيف ({{count}}):",
"historyAdded_other": "أُضيف ({{count}}):",
"historyRemoved_zero": "أُزيل ({{count}}):",
"historyRemoved_one": "أُزيل ({{count}}):",
"historyRemoved_two": "أُزيل ({{count}}):",
"historyRemoved_few": "أُزيل ({{count}}):",
"historyRemoved_many": "أُزيل ({{count}}):",
"historyRemoved_other": "أُزيل ({{count}}):",
"historyTotal_zero": "{{count}} صلاحية بعد التغيير",
"historyTotal_one": "{{count}} صلاحية بعد التغيير",
"historyTotal_two": "{{count}} صلاحيتان بعد التغيير",
"historyTotal_few": "{{count}} صلاحيات بعد التغيير",
"historyTotal_many": "{{count}} صلاحية بعد التغيير",
"historyTotal_other": "{{count}} صلاحية بعد التغيير"
},
"services": {
"counts": {
"orders": "{{count}} طلب"
}
},
"username": "اسم المستخدم",
"email": "البريد الإلكتروني",
"password": "كلمة المرور",
"roles": {
"searchPlaceholder": "ابحث في الأدوار...",
"addRole": "إضافة دور",
@@ -595,6 +530,69 @@
"fixFiltersFirst": "صحّح عوامل التصفية أعلاه لتحميل السجل."
}
},
"active": "نشط",
"issueResetLink": "إصدار رابط إعادة تعيين كلمة المرور",
"orderReceiverRole": "مستلم الطلبات",
"resetLinkModal": {
"title": "رابط إعادة تعيين كلمة المرور للمستخدم {{username}}",
"description": "شارك هذا الرابط لمرة واحدة مع المستخدم. يمكن استخدامه مرة واحدة فقط.",
"expires": "تنتهي الصلاحية: {{time}}",
"copy": "نسخ الرابط",
"copied": "تم نسخ الرابط"
},
"siteSettings": "إعدادات الموقع",
"siteNameAr": "اسم الموقع (عربي)",
"siteNameEn": "اسم الموقع (إنجليزي)",
"registrationOpen": "السماح بإنشاء حسابات",
"registrationOpenHint": "عند الإيقاف، الأدمن فقط يقدر ينشئ مستخدمين جدد.",
"footerTextAr": "نص التذييل (عربي)",
"footerTextEn": "نص التذييل (إنجليزي)",
"nav": {
"dashboard": "الرئيسية",
"apps": "التطبيقات",
"services": "الخدمات",
"users": "المستخدمين",
"groups": "المجموعات",
"roles": "الأدوار",
"auditLog": "سجل التدقيق",
"userManagement": "إدارة المستخدمين",
"settings": "الإعدادات",
"menu": "القائمة"
},
"apps": {
"counts": {
"groups": "{{count}} مجموعة",
"restrictions": "{{count}} قيد",
"opens": "{{count}} فتحة"
},
"historyTitle": "سجل الصلاحيات",
"historyHint": "الصلاحيات المطلوبة لاستخدام هذا التطبيق. صفِّ بحسب من غيّر أو متى.",
"historyEmpty": "لم تُسجَّل تغييرات صلاحيات لهذا التطبيق بعد.",
"historyEmptyFiltered": "لا توجد تغييرات صلاحيات تطابق الفلاتر الحالية.",
"historyAdded_zero": "أُضيف ({{count}}):",
"historyAdded_one": "أُضيف ({{count}}):",
"historyAdded_two": "أُضيف ({{count}}):",
"historyAdded_few": "أُضيف ({{count}}):",
"historyAdded_many": "أُضيف ({{count}}):",
"historyAdded_other": "أُضيف ({{count}}):",
"historyRemoved_zero": "أُزيل ({{count}}):",
"historyRemoved_one": "أُزيل ({{count}}):",
"historyRemoved_two": "أُزيل ({{count}}):",
"historyRemoved_few": "أُزيل ({{count}}):",
"historyRemoved_many": "أُزيل ({{count}}):",
"historyRemoved_other": "أُزيل ({{count}}):",
"historyTotal_zero": "{{count}} صلاحية بعد التغيير",
"historyTotal_one": "{{count}} صلاحية بعد التغيير",
"historyTotal_two": "{{count}} صلاحيتان بعد التغيير",
"historyTotal_few": "{{count}} صلاحيات بعد التغيير",
"historyTotal_many": "{{count}} صلاحية بعد التغيير",
"historyTotal_other": "{{count}} صلاحية بعد التغيير"
},
"services": {
"counts": {
"orders": "{{count}} طلب"
}
},
"groups": {
"searchPlaceholder": "ابحث في المجموعات...",
"addGroup": "إضافة مجموعة",
@@ -975,7 +973,10 @@
"newLabel": "تصنيف جديد",
"noLabelsYet": "لا توجد تصنيفات بعد",
"allLabels": "الكل",
"tabs": { "active": "ملاحظات", "archived": "الأرشيف" },
"tabs": {
"active": "ملاحظات",
"archived": "الأرشيف"
},
"pinned": "مثبّتة",
"others": "أخرى",
"empty": "ستظهر ملاحظاتك هنا",
@@ -1085,9 +1086,6 @@
"nav": {
"schedule": "جدول الاجتماعات اليومي",
"manage": "إدارة الاجتماعات",
"requests": "طلبات التعديل",
"approvals": "موافقات مدير المكتب",
"tasks": "مهام فريق التنسيق",
"notifications": "التنبيهات",
"audit": "سجل التعديلات",
"pdf": "تصدير PDF",
@@ -1179,86 +1177,6 @@
"saveFailed": "تعذر حفظ الاجتماع"
}
},
"requests": {
"heading": "طلبات التعديل",
"newRequest": "طلب جديد",
"myRequests": "طلباتي",
"allRequests": "جميع الطلبات",
"empty": "لا توجد طلبات.",
"filterStatus": "تصفية حسب الحالة",
"submitFor": "اقتراح تعديل على:",
"noTargetMeeting": "اقتراح اجتماع جديد (بدون ربط)",
"details": "التفاصيل",
"detailsPlaceholder": "اشرح ما تقترح بالتفصيل...",
"submitted": "تم إرسال الطلب",
"submitFailed": "تعذر إرسال الطلب",
"requestedBy": "مقدم الطلب",
"requestedAt": "وقت الطلب",
"type": {
"create": "إنشاء اجتماع",
"edit": "تعديل بيانات",
"delete": "حذف",
"reschedule": "إعادة جدولة",
"add_attendee": "إضافة حاضر",
"remove_attendee": "إزالة حاضر",
"change_location": "تغيير المكان",
"cancel_meeting": "إلغاء الاجتماع",
"note": "ملاحظة",
"highlight": "تمييز",
"unhighlight": "إزالة التمييز",
"other": "آخر"
},
"status": {
"new": "جديد",
"approved": "تمت الموافقة",
"rejected": "مرفوض",
"needs_edit": "يحتاج تعديل",
"withdrawn": "مسحوب",
"done": "تم"
}
},
"approvals": {
"heading": "موافقات مدير المكتب",
"empty": "لا توجد طلبات بانتظار المراجعة.",
"approve": "اعتماد",
"reject": "رفض",
"needsEdit": "إعادة للتعديل",
"needsEditDone": "تم إرجاع الطلب لمقدّمه",
"reviewNotes": "ملاحظات المراجعة",
"reviewNotesPlaceholder": "اكتب ملاحظاتك هنا (اختياري)",
"approved": "تم الاعتماد",
"rejected": "تم الرفض",
"actionFailed": "تعذر تنفيذ المراجعة"
},
"tasks": {
"heading": "مهام فريق التنسيق",
"addTask": "إضافة مهمة",
"empty": "لا توجد مهام.",
"field": {
"taskType": "نوع المهمة",
"assignee": "المُكلَّف",
"assigneeIdPlaceholder": "معرّف المستخدم",
"dueDate": "تاريخ الاستحقاق",
"notes": "ملاحظات",
"meeting": "الاجتماع",
"status": "الحالة"
},
"status": {
"pending": "بالانتظار",
"in_progress": "قيد التنفيذ",
"completed": "منجزة",
"cancelled": "ملغاة"
},
"markCompleted": "إنهاء المهمة",
"markInProgress": "بدء التنفيذ",
"deleteConfirm": "حذف هذه المهمة؟",
"saved": "تم حفظ المهمة",
"deleted": "تم حذف المهمة",
"reassign": "إعادة إسناد / تعديل",
"reassigned": "تم تحديث المهمة",
"myTasksOnly": "مهامي فقط",
"myTasksOnlyHelp": "ينظر المنسقون إلى المهام المسندة إليهم فقط، بينما يرى قائد التنسيق ومدير المكتب والمسؤول جميع المهام."
},
"audit": {
"heading": "سجل التعديلات",
"empty": "لا توجد قيود في السجل.",
+58 -140
View File
@@ -375,40 +375,6 @@
"replaceImage": "Replace Image",
"uploading": "Uploading...",
"uploadFailed": "Image upload failed",
"users": "Users",
"username": "Username",
"email": "Email",
"password": "Password",
"roles": "Roles",
"active": "Active",
"issueResetLink": "Issue password reset link",
"orderReceiverRole": "Order Receiver",
"resetLinkModal": {
"title": "Password reset link for {{username}}",
"description": "Share this one-time link with the user. It can only be used once.",
"expires": "Expires: {{time}}",
"copy": "Copy link",
"copied": "Link copied to clipboard"
},
"siteSettings": "Site Settings",
"siteNameAr": "Site Name (Arabic)",
"siteNameEn": "Site Name (English)",
"registrationOpen": "Allow public registration",
"registrationOpenHint": "When off, only admins can create new users.",
"footerTextAr": "Footer Text (Arabic)",
"footerTextEn": "Footer Text (English)",
"nav": {
"dashboard": "Dashboard",
"apps": "Apps",
"services": "Services",
"users": "Users",
"groups": "Groups",
"roles": "Roles",
"auditLog": "Audit log",
"userManagement": "User Management",
"settings": "Settings",
"menu": "Menu"
},
"users": {
"searchPlaceholder": "Search by username or email...",
"allGroups": "All groups",
@@ -461,28 +427,9 @@
}
}
},
"apps": {
"counts": {
"groups": "{{count}} groups",
"restrictions": "{{count}} restrictions",
"opens": "{{count}} opens"
},
"historyTitle": "Permission history",
"historyHint": "Permissions required to use this app. Filter by who changed it or when.",
"historyEmpty": "No permission changes have been recorded for this app yet.",
"historyEmptyFiltered": "No permission changes match the current filters.",
"historyAdded_one": "Added ({{count}}):",
"historyAdded_other": "Added ({{count}}):",
"historyRemoved_one": "Removed ({{count}}):",
"historyRemoved_other": "Removed ({{count}}):",
"historyTotal_one": "{{count}} permission after change",
"historyTotal_other": "{{count}} permissions after change"
},
"services": {
"counts": {
"orders": "{{count}} orders"
}
},
"username": "Username",
"email": "Email",
"password": "Password",
"roles": {
"searchPlaceholder": "Search roles...",
"addRole": "Add Role",
@@ -556,6 +503,57 @@
"fixFiltersFirst": "Fix the filters above to load history."
}
},
"active": "Active",
"issueResetLink": "Issue password reset link",
"orderReceiverRole": "Order Receiver",
"resetLinkModal": {
"title": "Password reset link for {{username}}",
"description": "Share this one-time link with the user. It can only be used once.",
"expires": "Expires: {{time}}",
"copy": "Copy link",
"copied": "Link copied to clipboard"
},
"siteSettings": "Site Settings",
"siteNameAr": "Site Name (Arabic)",
"siteNameEn": "Site Name (English)",
"registrationOpen": "Allow public registration",
"registrationOpenHint": "When off, only admins can create new users.",
"footerTextAr": "Footer Text (Arabic)",
"footerTextEn": "Footer Text (English)",
"nav": {
"dashboard": "Dashboard",
"apps": "Apps",
"services": "Services",
"users": "Users",
"groups": "Groups",
"roles": "Roles",
"auditLog": "Audit log",
"userManagement": "User Management",
"settings": "Settings",
"menu": "Menu"
},
"apps": {
"counts": {
"groups": "{{count}} groups",
"restrictions": "{{count}} restrictions",
"opens": "{{count}} opens"
},
"historyTitle": "Permission history",
"historyHint": "Permissions required to use this app. Filter by who changed it or when.",
"historyEmpty": "No permission changes have been recorded for this app yet.",
"historyEmptyFiltered": "No permission changes match the current filters.",
"historyAdded_one": "Added ({{count}}):",
"historyAdded_other": "Added ({{count}}):",
"historyRemoved_one": "Removed ({{count}}):",
"historyRemoved_other": "Removed ({{count}}):",
"historyTotal_one": "{{count}} permission after change",
"historyTotal_other": "{{count}} permissions after change"
},
"services": {
"counts": {
"orders": "{{count}} orders"
}
},
"groups": {
"searchPlaceholder": "Search groups...",
"addGroup": "Add Group",
@@ -876,7 +874,10 @@
"newLabel": "New label",
"noLabelsYet": "No labels yet",
"allLabels": "All",
"tabs": { "active": "Notes", "archived": "Archived" },
"tabs": {
"active": "Notes",
"archived": "Archived"
},
"pinned": "Pinned",
"others": "Others",
"empty": "Your notes will appear here",
@@ -986,9 +987,6 @@
"nav": {
"schedule": "Daily Schedule",
"manage": "Manage Meetings",
"requests": "Change Requests",
"approvals": "Office Manager Approvals",
"tasks": "Coordination Tasks",
"notifications": "Notifications",
"audit": "Audit Log",
"pdf": "PDF Export",
@@ -1080,86 +1078,6 @@
"saveFailed": "Could not save the meeting"
}
},
"requests": {
"heading": "Change Requests",
"newRequest": "New request",
"myRequests": "My requests",
"allRequests": "All requests",
"empty": "No requests yet.",
"filterStatus": "Filter by status",
"submitFor": "Suggest a change to:",
"noTargetMeeting": "Propose a brand-new meeting (no link)",
"details": "Details",
"detailsPlaceholder": "Explain your suggestion in detail...",
"submitted": "Request submitted",
"submitFailed": "Could not submit the request",
"requestedBy": "Submitted by",
"requestedAt": "Submitted at",
"type": {
"create": "Create meeting",
"edit": "Edit details",
"delete": "Delete",
"reschedule": "Reschedule",
"add_attendee": "Add attendee",
"remove_attendee": "Remove attendee",
"change_location": "Change location",
"cancel_meeting": "Cancel meeting",
"note": "Note",
"highlight": "Highlight",
"unhighlight": "Remove highlight",
"other": "Other"
},
"status": {
"new": "New",
"approved": "Approved",
"rejected": "Rejected",
"needs_edit": "Needs edit",
"withdrawn": "Withdrawn",
"done": "Done"
}
},
"approvals": {
"heading": "Office Manager Approvals",
"empty": "No requests pending review.",
"approve": "Approve",
"reject": "Reject",
"needsEdit": "Send back for edits",
"needsEditDone": "Sent back to requester",
"reviewNotes": "Review notes",
"reviewNotesPlaceholder": "Optional notes for the requester",
"approved": "Approved",
"rejected": "Rejected",
"actionFailed": "Could not complete the review"
},
"tasks": {
"heading": "Coordination Tasks",
"addTask": "Add task",
"empty": "No tasks yet.",
"field": {
"taskType": "Task type",
"assignee": "Assignee",
"assigneeIdPlaceholder": "User ID",
"dueDate": "Due date",
"notes": "Notes",
"meeting": "Meeting",
"status": "Status"
},
"status": {
"pending": "Pending",
"in_progress": "In progress",
"completed": "Completed",
"cancelled": "Cancelled"
},
"markCompleted": "Mark completed",
"markInProgress": "Start",
"deleteConfirm": "Delete this task?",
"saved": "Task saved",
"deleted": "Task deleted",
"reassign": "Reassign / edit",
"reassigned": "Task updated",
"myTasksOnly": "My tasks only",
"myTasksOnlyHelp": "Coordinators only see tasks assigned to them. Lead/admin roles see all tasks."
},
"audit": {
"heading": "Audit Log",
"empty": "No audit entries.",
File diff suppressed because it is too large Load Diff