1import { A as C, o as u, i as h, f as b, I as $, a as t, C as D, u as e, b as S, s as B, j as Y, l as M, J as U, c as A, e as l, n as I, B as N, t as n, d as x, w as f, v as w, F as z } from "./app-yg_pP4S4.js"; 2import { u as E } from "./modelWrapper-D0DowOi8.js"; 3import { r as F } from "./XMarkIcon-C7ztHuKP.js"; 4import { r as T } from "./index-BF2h0ubX.js"; 5import { _ as j } from "./BaseInput-DrEncIoW.js"; 6import { _ as J } from "./FormFooter-BR3rPhrH.js"; 7import { _ as d } from "./InputError-c3Vl2Z79.js"; 8import { _ as R } from "./TipTapEditor-syDIvp4e.js"; 9import { _ as W } from "./DashboardLayout-CXf_hhYT.js"; 10import { r as q } from "./QuestionMarkCircleIcon-JTZoUTWk.js"; 11import "./index-CDyB1Hog.js"; 12import "./functions-DLrKIvnr.js"; 13import "./popover-DTQdCRwt.js"; 14import "./UserAvatar-B3-R1wxh.js"; 15import "./BaseButton-DP1PFEmO.js"; 16import "./ApplicationLogo-D4QkytOJ.js"; 17import "./LiveChat-BEmWJs6j.js"; 18import "./_plugin-vue_export-helper-DlAUqK2U.js"; 19import "./consts-7Qk9bpse.js"; 20import "./form-BcDj1t5Y.js"; 21import "./LoaderIcon-BfI_LFZK.js"; 22import "./ModalConfirmation-BptK8hn4.js"; 23import "./CheckIcon-Bb6ppPFl.js"; 24import "./BaseModal-lnT_D81c.js"; 25import "./EyeIcon-C30yl1ND.js"; 26import "./HomeIcon-B7IW8yDA.js"; 27import "./MinusIcon-C5ZUuSoW.js"; 28import "./menu-DpWDC0YJ.js"; 29import "./use-text-value-9Z6g_4jd.js"; 30import "./use-tree-walker-DC0osvAV.js"; 31import "./vue-transitions-DxcThSkT.js"; 32import "./ClockIcon-DWc8x_ii.js"; 33const G = { class: "group relative mt-1 rounded-md" }, H = ["value", "placeholder", "disabled", "onClick"], K = { class: "absolute inset-y-0 right-0 flex cursor-pointer items-center pr-4 text-gray-400 transition-opacity duration-300 hover:text-gray-500 group-hover:opacity-100" }, V = { __name: "BaseDateInput", props: { placeholder: { type: String, default: "" }, modelValue: { type: [String, Number, Date], default: "" }, editable: { type: Boolean, default: false }, hasErrors: { type: Boolean, default: false } }, emits: ["update:modelValue"], setup(i, { emit: o }) { 34 const p = i, s = o, m = E(p, s, "modelValue"), v = (r) => { 35 m.value = null, r(); 36 }; 37 return (r, c) => { 38 const a = C("v-date-picker"); 39 return u(), h(a, { modelValue: e(m), "onUpdate:modelValue": c[0] || (c[0] = (_) => B(m) ? m.value = _ : null), color: "primary" }, { default: b(({ inputValue: _, togglePopover: y, hidePopover: k }) => [$(r.$slots, "default", {}, () => [t("div", G, [t("input", { type: "text", value: _, class: D(["peer w-full rounded-md border-gray-300 px-0 pl-2 pr-10 text-sm text-gray-500 shadow-sm focus:border-primary-500 focus:ring-primary-500 sm:text-sm", [i.editable ? "group-hover:border-1 focus:bg-gray-100 group-hover:cursor-pointer group-hover:border-gray-300 group-hover:bg-gray-100 group-hover:text-gray-800" : "cursor-text px-0", i.hasErrors ? "placeholder-red-300" : ""]]), placeholder: i.placeholder, disabled: !i.editable, readonly: "", onClick: (g) => y() }, null, 10, H), t("div", K, [i.editable && i.modelValue ? (u(), h(e(F), { key: 0, class: "h-5 w-5", "aria-hidden": "true", onClick: (g) => v(k) }, null, 8, ["onClick"])) : i.editable ? (u(), h(e(T), { key: 1, class: "h-5 w-5", "aria-hidden": "true", onClick: (g) => y() }, null, 8, ["onClick"])) : S("", true)])])])]), _: 3 }, 8, ["modelValue"]); 40 }; 41} }, L = { class: "p-4 sm:p-6 lg:w-2/3" }, O = { class: "text-lg font-bold text-gray-900" }, Q = { class: "mt-2" }, X = { class: "mt-2" }, Z = { for: "title", class: "block text-sm font-medium text-gray-700" }, P = { class: "mt-1 rounded-md" }, ee = { class: "mt-2" }, te = { for: "content", class: "block text-sm font-medium text-gray-700" }, se = { class: "mt-1 rounded-md" }, oe = { class: "mt-2" }, re = { for: "show_from", class: "flex text-sm font-medium text-gray-700" }, le = { class: "mt-1 rounded-md" }, ae = { class: "mb-4 mt-2 text-xs text-gray-500" }, ne = { class: "mt-2" }, ie = { for: "show_until", class: "block text-sm font-medium text-gray-700" }, me = { class: "mt-1 rounded-md" }, de = { class: "mt-4 flex items-start" }, ce = { class: "flex h-5 items-center" }, ue = { class: "ml-3 text-sm" }, pe = { for: "active_subscribers_only", class: "font-medium text-gray-700 [@media(hover:none)]:relative [@media(hover:none)]:after:absolute [@media(hover:none)]:after:-inset-y-3.5 [@media(hover:none)]:after:-left-7 [@media(hover:none)]:after:right-0" }, _e = { class: "text-gray-500" }, he = { class: "mt-4 flex items-start" }, fe = { class: "flex h-5 items-center" }, be = { class: "ml-3 text-sm" }, ve = { for: "send_by_email", class: "font-medium text-gray-700 [@media(hover:none)]:relative [@media(hover:none)]:after:absolute [@media(hover:none)]:after:-inset-y-3.5 [@media(hover:none)]:after:-left-7 [@media(hover:none)]:after:right-0" }, ye = { class: "text-gray-500" }, et = { __name: "AnnouncementCreate", setup(i) { 42 const { t: o } = Y(), p = [{ label: o("Clients"), url: route("organizations.index") }, { label: o("Announcements"), url: route("announcements.index") }, { label: o("Create") }], s = M({ title: null, content: null, show_from: null, show_until: null, active_subscribers_only: false, send_by_email: false }), m = () => { 43 s.post(route("announcements.store"), { preserveScroll: true }); 44 }; 45 return (v, r) => { 46 const c = U("tooltip"); 47 return u(), A(z, null, [l(e(I), { title: e(o)("Create announcement") }, null, 8, ["title"]), l(W, { breadcrumbs: p, "show-footer": false, "wrapper-class": "overflow-clip" }, { header: b(() =>
47 [x(n(e(o)("Create announcement")), 1)]), default: b(() => [t("form", { autocomplete: "off", class: "max-lg:[&_[contenteditable=true]]:text-base max-lg:[&_input]:text-base", onSubmit: N(m, ["prevent"]) }, [t("div", L, [t("div", null, [t("div", O, n(e(o)("Announcement")), 1)]), t("div", Q, [t("div", X, [t("label", Z, n(e(o)("Title")), 1), t("div", P, [l(j, { id: "title", modelValue: e(s).title, "onUpdate:modelValue": r[0] || (r[0] = (a) => e(s).title = a), "has-errors": e(s).errors.title, class: "flex w-full flex-grow items-stretch focus-within:z-10", "input-class": "rounded-md" }, null, 8, ["modelValue", "has-errors"]), l(d, { message: e(s).errors.title }, null, 8, ["message"])])]), t("div", ee, [t("label", te, n(e(o)("Content")), 1), t("div", se, [l(R, { modelValue: e(s).content, "onUpdate:modelValue": r[1] || (r[1] = (a) => e(s).content = a), class: "block w-full rounded-md", "show-buttons": "" }, null, 8, ["modelValue"]), l(d, { message: e(s).errors.content }, null, 8, ["message"])])]), t("div", oe, [t("label", re, [x(n(e(o)("Show from")) + " ", 1), f(l(e(q), { class: "ml-2 h-5 w-5 cursor-help text-gray-400" }, null, 512), [[c, e(o)("This date is inclusive"), void 0, { "top-start": true }]])]), t("div", le, [l(V, { modelValue: e(s).show_from, "onUpdate:modelValue": r[2] || (r[2] = (a) => e(s).show_from = a), editable: "", placeholder: "YYYY-MM-DD" }, null, 8, ["modelValue"]), l(d, { message: e(s).errors.show_from }, null, 8, ["message"])]), t("p", ae, n(e(o)("If you leave this field empty, the announcement will be visible immediately.")), 1
47)]), t("div", ne, [t("label", ie, n(e(o)("Show until")), 1), t("div", me, [l(V, { modelValue: e(s).show_until, "onUpdate:modelValue": r[3] || (r[3] = (a) => e(s).show_until = a), editable: "", placeholder: "YYYY-MM-DD" }, null, 8, ["modelValue"]), l(d, { message: e(s).errors.show_until }, null, 8, ["message"])])]), t("div", de, [t("div", ce, [f(t("input", { id: "active_subscribers_only", "onUpdate:modelValue": r[4] || (r[4] = (a) => e(s).active_subscribers_only = a), name: "active_subscribers_only", type: "checkbox", class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500" }, null, 512), [[w, e(s).active_subscribers_only]])]), t("div", ue, [t("label", pe, n(e(o)("Active subscribers only")), 1), t("p", _e, n(e(o)("If checked, only clients with an active subscription will receive this announcement.")), 1), l(d, { message: e(s).errors.active_subscribers_only }, null, 8, ["message"])])]), t("div", he, [t("div", fe, [f(t("input", { id: "send_by_email", "onUpdate:modelValue": r[5] || (r[5] = (a) => e(s).send_by_email = a), name: "send_by_email", type: "checkbox", class: "h-4 w-4 rounded border-gray-300 text-primary-600 focus:ring-primary-500" }, null, 512), [[w, e(s).send_by_email]])]), t("div", be, [t("label", ve, n(e(o)("Send by email")), 1), t("p", ye, n(e(o)("If checked, this announcement will also be sent by email.")), 1), l(d, { message: e(s).errors.send_by_email }, null, 8, ["message"])])])])]), l(J, { class: "col-span-3", "is-dirty": e(s).isDirty, processing: e(s).processing, "submit-text": e(o)("Create") }, null, 8, ["is-dirty", "processing", "submit-text"])], 32)]), _: 1 })], 64); 48 }; 49} }; 50export { 51 et as default 52};
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.