| @@ -163,8 +163,16 @@ | ||
| 163 | 163 | // Webhooks — Agency-only sidebar menu, same instant-toggle pattern. |
| 164 | 164 | window.yatraAdmin.webhooksEnabled = enabledModules.some( |
| 165 | 165 | (m) => m.slug === "webhooks", |
| 166 | 166 | ); |
| 167 | + // Scheduled Payments — decides whether Payments is a plain menu item | |
| 168 | + // or a parent with All Payments / Scheduled beneath it. Same | |
| 169 | + // instant-toggle pattern, so the submenu appears and disappears as the | |
| 170 | + // module is switched, without reloading the admin. | |
| 171 | + window.yatraAdmin.scheduledPaymentsEnabled = enabledModules.some( | |
| 172 | + (m) => | |
| 173 | + m.slug === "scheduled_payments" || m.slug === "scheduled-payments", | |
| 174 | + ); | |
| 167 | 175 | // Team & Access — Agency-only sidebar menu. Also drives the |
| 168 | 176 | // teamEnabled flag that <Can/> reads to decide whether the |
| 169 | 177 | // capability gates apply (vs admin fallback). |
| 170 | 178 | window.yatraAdmin.teamEnabled = enabledModules.some( |
| @@ -308,8 +316,16 @@ | ||
| 308 | 316 | ); |
| 309 | 317 | // Webhooks — Agency-only sidebar menu, same instant-toggle pattern. |
| 310 | 318 | window.yatraAdmin.webhooksEnabled = enabledModules.some( |
| 311 | 319 | (m) => m.slug === "webhooks", |
| 320 | + ); | |
| 321 | + // Scheduled Payments — decides whether Payments is a plain menu item | |
| 322 | + // or a parent with All Payments / Scheduled beneath it. Same | |
| 323 | + // instant-toggle pattern, so the submenu appears and disappears as the | |
| 324 | + // module is switched, without reloading the admin. | |
| 325 | + window.yatraAdmin.scheduledPaymentsEnabled = enabledModules.some( | |
| 326 | + (m) => | |
| 327 | + m.slug === "scheduled_payments" || m.slug === "scheduled-payments", | |
| 312 | 328 | ); |
| 313 | 329 | // Team & Access — Agency-only sidebar menu. Also drives the |
| 314 | 330 | // teamEnabled flag that <Can/> reads to decide whether the |
| 315 | 331 | // capability gates apply (vs admin fallback). |