1import{r as o,j as t,b as l}from"./app-D3o7_eok.js";import{A as d}from"./AlertSubscriptionModal-C7Am5epJ.js";import{A as m}from"./SiteLogo-BHVXMBiR.js";import{P as x}from"./ProfileNav-CnBaGzuQ.js";import{S as p}from"./SiteLayout-BIYL9gte.js";import"./Modal-DolDGeDR.js";import"./transition-Cdi9MGB7.js";import"./TypeaheadInput-B_Ioez8o.js";import"./autocompleteCache-B1DdxamR.js";function h({alerts:w,degreeTypes:n}){const[c,r]=o.useState(!1);function i(e){l.patch(route("alerts.toggle",e.id),{},{preserveScroll:!0})}function a(e){window.confirm("Delete this alert subscription?")&&l.delete(route("alerts.destroy",e.id),{preserveScroll:!0})}return t.jsxs(t.Fragment,{children:[t.jsx(m,{title:"Admission Alerts",children:t.jsx("meta",{name:"robots",content:"noindex"})}),t.jsx("div",{className:"tw-py-8",children:t.jsx("div",{className:"tw-mx-auto tw-max-w-7xl tw-px-4 sm:tw-px-6 lg:tw-px-8",children:t.jsxs("div",{className:"tw-grid tw-grid-cols-1 tw-gap-6 lg:tw-grid-cols-[16rem_1fr] lg:tw-gap-8",children:[t.jsx("div",{children:t.jsx(x,{})}),t.jsxs("div",{className:"tw-bg-white tw-shadow sm:tw-rounded-lg tw-p-4 sm:tw-p-6",children:[t.jsxs("div",{className:"tw-mb-6 tw-flex tw-flex-col tw-gap-3 sm:tw-flex-row sm:tw-items-center sm:tw-justify-between",children:[t.jsx("h1",{className:"tw-text-xl tw-font-semibold tw-text-gray-900",children:"Admission Alerts"}),t.jsxs("button",{type:"button",onClick:()=>r(!0),className:"tw-inline-flex tw-items-center tw-gap-x-1.5 tw-rounded-md tw-bg-primary-600 tw-px-3 tw-py-2 tw-text-sm tw-font-medium tw-text-white tw-shadow-sm hover:tw-bg-primary-700 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-primary-500 focus:tw-ring-offset-2",children:[t.jsx("svg",{className:"-tw-ml-0.5 tw-h-5 tw-w-5",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:t.jsx("path",{d:"M10.75 4.75a.75.75 0 0 0-1.5 0v4.5h-4.5a.75.75 0 0 0 0 1.5h4.5v4.5a.75.75 0 0 0 1.5 0v-4.5h4.5a.75.75 0 0 0 0-1.5h-4.5v-4.5Z"})}),"Add Alert"]})]}),w.length===0?t.jsxs("div",{className:"tw-text-center tw-py-12",children:[t.jsx("p",{className:"tw-text-sm tw-text-gray-500",children:"You have no alert subscriptions yet."}),t.jsx("button",{type:"button",onClick:()=>r(!0),className:"tw-mt-4 tw-text-sm tw-font-medium tw-text-primary-600 hover:tw-text-primary-500",children:"Add your first alert"})]}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"tw-space-y-3 md:tw-hidden",children:w.map(e=>{const s=!e.deactivated_at;return t.jsxs("div",{className:"tw-rounded-lg tw-border tw-border-gray-200 tw-p-4",children:[t.jsx("p",{className:"tw-text-sm tw-font-semibold tw-text-gray-900",children:e.institution||"All Schools"}),t.jsx("p",{className:"tw-mt-1 tw-text-sm tw-text-gray-600",children:e.programme||"All Programs"}),t.jsxs("p",{className:"tw-mt-1 tw-text-xs tw-text-gray-500",children:["Degree: ",e.level||"Any Degree"]}),t.jsxs("div",{className:"tw-mt-3 tw-flex tw-items-center tw-justify-between tw-gap-3",children:[t.jsx("span",{className:["tw-inline-flex tw-items-center tw-rounded-full tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-medium",s?"tw-bg-green-100 tw-text-green-800":"tw-bg-gray-100 tw-text-gray-600"].join(" "),children:s?"Active":"Inactive"}),t.jsxs("div",{className:"tw-flex tw-items-center tw-gap-3",children:[t.jsx("button",{type:"button",onClick:()=>i(e),className:"tw-text-sm tw-font-medium tw-text-primary-600 hover:tw-text-primary-900",children:s?"Deactivate":"Activate"}),t.jsx("button",{type:"button",onClick:()=>a(e),className:"tw-text-sm tw-font-medium tw-text-red-600 hover:tw-text-red-900",children:"Delete"})]})]})]},e.id)})}),t.jsx("div",{className:"tw-hidden md:tw-flow-root",children:t.jsx("div",{className:"-tw-mx-4 -tw-my-2 tw-overflow-x-auto sm:-tw-mx-6 lg:-tw-mx-8",children:t.jsx("div",{className:"tw-inline-block tw-min-w-full tw-py-2 tw-align-middle sm:tw-px-6 lg:tw-px-8",children:t.jsxs("table",{className:"tw-min-w-full tw-divide-y tw-divide-gray-300",children:[t.jsx("thead",{children:t.jsxs("tr",{children:[t.jsx("th",{scope:"col",className:"tw-py-3.5 tw-pl-4 tw-pr-3 tw-text-left tw-text-sm tw-font-semibold tw-text-gray-900 sm:tw-pl-0",children:"School"}),t.jsx("th",{scope:"col",className:"tw-px-3 tw-py-3.5 tw-text-left tw-text-sm tw-font-semibold tw-text-gray-900",children:"Program"}),t.jsx("th",{scope:"col",className:"tw-hidden tw-px-3 tw-py-3.5 tw-text-left tw-text-sm tw-font-semibold tw-text-gray-900 md:tw-table-cell",children:"Degree"}),t.jsx("th",{scope:"col",className:"tw-px-3 tw-py-3.5 tw-text-left tw-text-sm tw-font-semibold tw-text-gray-900",children:"Status"}),t.jsx("th",{scope:"col",className:"tw-relative tw-py-3.5 tw-pl-3 tw-pr-4 sm:tw-pr-0",children:t.jsx("span",{className:"tw-sr-only",children:"Actions"})})]})}),t.jsx("tbody",{className:"tw-divide-y tw-divide-gray-200",children:w.map(e=>{const s=!e.deactivated_at;return t.jsxs("tr",{children:[t.jsx("td",{className:"tw-whitespace-nowrap tw-py-4 tw-pl-4 tw-pr-3 tw-text-sm tw-font-medium tw-text-gray-900 sm:tw-pl-0",children:e.institution||t.jsx("span",{className:"tw-text-gray-400",children:"All Schools"})}),t.jsx("td",{className:"tw-whitespace-nowrap tw-px-3 tw-py-4 tw-text-sm tw-text-gray-500",children:e.programme||t.jsx("span",{className:"tw-text-gray-400",children:"All Programs"})}),t.jsx("td",{className:"tw-hidden tw-whitespace-nowrap tw-px-3 tw-py-4 tw-text-sm tw-text-gray-500 md:tw-table-cell",children:e.level||t.jsx("span",{className:"tw-text-gray-400",children:"Any Degree"})}),t.jsx("td",{className:"tw-whitespace-nowrap tw-px-3 tw-py-4 tw-text-sm",children:t.jsx("span",{className:["tw-inline-flex tw-items-center tw-rounded-full tw-px-2.5 tw-py-0.5 tw-text-xs tw-font-medium",s?"tw-bg-green-100 t
1w-text-green-800":"tw-bg-gray-100 tw-text-gray-600"].join(" "),children:s?"Active":"Inactive"})}),t.jsx("td",{className:"tw-relative tw-whitespace-nowrap tw-py-4 tw-pl-3 tw-pr-4 tw-text-right tw-text-sm tw-font-medium sm:tw-pr-0",children:t.jsxs("div",{className:"tw-flex tw-items-center tw-justify-end tw-gap-x-3",children:[t.jsx("button",{type:"button",onClick:()=>i(e),className:"tw-text-primary-600 hover:tw-text-primary-900",children:s?"Deactivate":"Activate"}),t.jsx("button",{type:"button",onClick:()=>a(e),className:"tw-text-red-600 hover:tw-text-red-900",children:"Delete"})]})})]},e.id)})})]})})})})]})]})]})})}),t.jsx(d,{show:c,onClose:()=>r(!1),onSuccess:()=>l.reload({only:["alerts"],preserveScroll:!0}),degreeTypes:n})]})}h.layout=w=>t.jsx(p,{children:w});export{h as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.