@webx-ui/module-vacancies 0.2.5 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/VacanciesPage-C99Ki3hv.js +512 -0
- package/dist/VacanciesPage-C99Ki3hv.js.map +1 -0
- package/dist/VacancyEditorPage-Dw_pfwyv.js +378 -0
- package/dist/VacancyEditorPage-Dw_pfwyv.js.map +1 -0
- package/dist/days-BPKXoD8l.js +24 -0
- package/dist/days-BPKXoD8l.js.map +1 -0
- package/dist/index-V7QvGgXw.js +467 -0
- package/dist/index-V7QvGgXw.js.map +1 -0
- package/dist/index.d.ts +14 -2
- package/dist/index.js +14 -1343
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,1346 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { useRoute as Pe, useRouter as ze, onBeforeRouteLeave as yt } from "vue-router";
|
|
4
|
-
import { useModal as ft, WxDialog as mt, WxFormItem as $e, WxInput as Me, WxSpace as gt, WxButton as ae, createModal as bt, WxIcon as re, WxPopover as wt, WxSelect as Ie, WxIndicator as _t, WxAction as xt, WxSkeleton as he, WxEmpty as Le, WxSortableList as kt, WxTooltip as Ne, WxBadge as Y, WxAlert as Tt, toast as w, confirm as J, useLocales as $t, localizedValue as Vt, WxCard as Wt, WxBreadcrumb as Ct, WxBreadcrumbItem as Se, WxActionBar as It, WxText as Nt } from "@webx-ui/core";
|
|
5
|
-
const Re = "vacancies";
|
|
6
|
-
function fe(u) {
|
|
7
|
-
const d = `${u.apiPath}/${Re}`, f = (l) => l.data, v = (l, m, a = {}) => u.http.post(`${d}/${l}/${m}`, a).then(f);
|
|
8
|
-
return {
|
|
9
|
-
list: (l = {}) => {
|
|
10
|
-
const m = new URLSearchParams();
|
|
11
|
-
return l.trashed ? m.set("trashed", "1") : m.set("state", l.state ?? "open"), l.q && m.set("q", l.q), l.category != null && m.set("category", String(l.category)), l.status && m.set("status", l.status), u.http.get(`${d}?${m}`);
|
|
12
|
-
},
|
|
13
|
-
get: (l) => u.http.get(`${d}/${l}`).then(f),
|
|
14
|
-
create: (l) => u.http.post(d, l).then(f),
|
|
15
|
-
save: (l, m) => u.http.put(`${d}/${l}`, m).then(f),
|
|
16
|
-
discard: (l) => u.http.post(`${d}/${l}/discard`, {}).then(f),
|
|
17
|
-
duplicate: (l) => u.http.post(`${d}/${l}/duplicate`, {}).then(f),
|
|
18
|
-
publish: (l, m) => v(l, "publish", m ? { revision: m } : {}),
|
|
19
|
-
unpublish: (l) => v(l, "unpublish"),
|
|
20
|
-
close: (l) => v(l, "close"),
|
|
21
|
-
reopen: (l) => v(l, "reopen"),
|
|
22
|
-
remove: (l) => u.http.delete(`${d}/${l}`).then(() => {
|
|
23
|
-
}),
|
|
24
|
-
restore: (l) => v(l, "restore"),
|
|
25
|
-
// No `category`, ever: vacancies have one order (§4.11), unlike services.
|
|
26
|
-
reorder: (l) => He(u, Re, l, null),
|
|
27
|
-
versions: (l) => u.http.get(`${d}/${l}/versions`).then(f),
|
|
28
|
-
restoreVersion: (l, m) => u.http.post(`${d}/${l}/versions/${m}/restore`, {}).then(f)
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
const St = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
32
|
-
function Fe(u) {
|
|
33
|
-
const d = typeof u == "string" ? St.exec(u.slice(0, 10)) : null;
|
|
34
|
-
if (d === null) return null;
|
|
35
|
-
const [, f, v, l] = d, m = new Date(Number(f), Number(v) - 1, Number(l));
|
|
36
|
-
return Number.isNaN(m.getTime()) ? null : m;
|
|
37
|
-
}
|
|
38
|
-
function Rt(u, d, f = /* @__PURE__ */ new Date()) {
|
|
39
|
-
const v = Fe(u);
|
|
40
|
-
return v === null ? "" : new Intl.DateTimeFormat(d, {
|
|
41
|
-
day: "numeric",
|
|
42
|
-
month: "short",
|
|
43
|
-
...v.getFullYear() === f.getFullYear() ? {} : { year: "numeric" }
|
|
44
|
-
}).format(v);
|
|
45
|
-
}
|
|
46
|
-
function Ue(u, d) {
|
|
47
|
-
const f = Fe(u);
|
|
48
|
-
return f === null ? "" : new Intl.DateTimeFormat(d, { day: "numeric", month: "long", year: "numeric" }).format(f);
|
|
49
|
-
}
|
|
50
|
-
const Et = {
|
|
51
|
-
module: {
|
|
52
|
-
group: "Vacancies",
|
|
53
|
-
vacancies: "Vacancies",
|
|
54
|
-
categories: "Categories"
|
|
55
|
-
},
|
|
56
|
-
panel: {
|
|
57
|
-
new: "New vacancy",
|
|
58
|
-
"new-title": "New vacancy",
|
|
59
|
-
"field-title": "Position",
|
|
60
|
-
create: "Create",
|
|
61
|
-
cancel: "Cancel",
|
|
62
|
-
search: "Search by position or address",
|
|
63
|
-
empty: "No vacancies yet.",
|
|
64
|
-
"empty-help": "A vacancy is who you are looking for: the position, where, the terms and the pay.",
|
|
65
|
-
"empty-open": "No open vacancies. The closed ones are on the next tab.",
|
|
66
|
-
"empty-closed": "No vacancy is closed.",
|
|
67
|
-
"empty-search": "Nothing matches that.",
|
|
68
|
-
"empty-bin": "The bin is empty.",
|
|
69
|
-
"status-draft": "Draft",
|
|
70
|
-
"status-published": "Live",
|
|
71
|
-
"status-modified": "Live",
|
|
72
|
-
"status-unpublished": "Off the site",
|
|
73
|
-
edits: "edits",
|
|
74
|
-
"closed-manual": "Closed",
|
|
75
|
-
"closed-expired": "Expired",
|
|
76
|
-
"closed-manual-help": "The hiring was closed by hand.",
|
|
77
|
-
"closed-expired-help": "Its last day is behind us.",
|
|
78
|
-
"no-address": "No address in this language",
|
|
79
|
-
"no-city": "No city",
|
|
80
|
-
until: "until :date",
|
|
81
|
-
"until-help": "Open to the end of :date",
|
|
82
|
-
"view-open": "Open",
|
|
83
|
-
"view-closed": "Closed",
|
|
84
|
-
"view-all": "All",
|
|
85
|
-
bin: "Bin",
|
|
86
|
-
filters: "Filters",
|
|
87
|
-
"filters-reset": "Reset the filters",
|
|
88
|
-
"filter-status": "State",
|
|
89
|
-
"any-status": "Any state",
|
|
90
|
-
"filter-category": "Category",
|
|
91
|
-
"any-category": "Any category",
|
|
92
|
-
"order-all": "Drag a vacancy by its handle to change the order the site lists them in.",
|
|
93
|
-
"order-closed": "The order is set on the Open and All tabs: a closed vacancy is on no list of the site.",
|
|
94
|
-
"order-locked": "The order can only be changed in the whole list — clear the search and the filters.",
|
|
95
|
-
"reorder-failed": "The new order was not saved.",
|
|
96
|
-
open: "Open",
|
|
97
|
-
"open-on-site": "Open on the site",
|
|
98
|
-
"copy-address": "Copy the address",
|
|
99
|
-
"address-copied": "The address is copied.",
|
|
100
|
-
duplicate: "Duplicate",
|
|
101
|
-
duplicated: "This is the copy: a draft. Change what differs and publish it.",
|
|
102
|
-
close: "Close the hiring",
|
|
103
|
-
reopen: "Reopen the hiring",
|
|
104
|
-
"close-title": "Close “:title”?",
|
|
105
|
-
"close-text": "It leaves every list of the site. Its page stays, marked as closed, so links from job boards still lead somewhere.",
|
|
106
|
-
"reopen-title": "Reopen “:title”?",
|
|
107
|
-
"reopen-text": "It is back on the lists of the site, unless its last day is already behind us.",
|
|
108
|
-
"reopen-expired": "Its last day is behind us, so it stays closed: change “Open until” in the editor to reopen it.",
|
|
109
|
-
closed: "The hiring is closed.",
|
|
110
|
-
reopened: "The hiring is open again.",
|
|
111
|
-
"close-edits": "This vacancy has edits waiting. Publish or discard them first — closing would put them on the site too.",
|
|
112
|
-
publish: "Publish",
|
|
113
|
-
unpublish: "Take off the site",
|
|
114
|
-
delete: "Delete",
|
|
115
|
-
restore: "Restore",
|
|
116
|
-
"delete-title": "Delete “:title”?",
|
|
117
|
-
"delete-text": "It goes to the bin and comes off the site, and its address is free again.",
|
|
118
|
-
deleted: "The vacancy is in the bin.",
|
|
119
|
-
restored: "The vacancy is back.",
|
|
120
|
-
published: "The vacancy is on the site.",
|
|
121
|
-
"unpublished-done": "The vacancy is off the site."
|
|
122
|
-
},
|
|
123
|
-
editor: {
|
|
124
|
-
trail: "Where this vacancy sits",
|
|
125
|
-
untitled: "Untitled",
|
|
126
|
-
save: "Save",
|
|
127
|
-
"save-failed": "The vacancy was not saved.",
|
|
128
|
-
"publish-title": "Put “:title” on the site?",
|
|
129
|
-
"publish-text": "It answers at :address from the moment you do, for everyone — with its categories and form as they are chosen now.",
|
|
130
|
-
"publish-nowhere": "It has no address in this language yet, so nothing will answer.",
|
|
131
|
-
preview: "Preview",
|
|
132
|
-
discard: "Discard changes",
|
|
133
|
-
discarded: "The vacancy is back to what is published.",
|
|
134
|
-
"conflict-title": "The vacancy changed while you were editing",
|
|
135
|
-
"conflict-mine": "Keep mine",
|
|
136
|
-
"conflict-theirs": "Take the newer version",
|
|
137
|
-
"conflict-theirs-title": "Give up what you wrote?",
|
|
138
|
-
"conflict-theirs-text": "The vacancy is read again as it now is, and what you have typed since goes.",
|
|
139
|
-
leave: "Leave",
|
|
140
|
-
"leave-title": "Leave without saving?",
|
|
141
|
-
"leave-text": "The vacancy could not be saved, and what you wrote is not on the server.",
|
|
142
|
-
"live-since": "On the site since :date",
|
|
143
|
-
"open-until": "Open until :date",
|
|
144
|
-
"address-moving": "The address is changing. The old one keeps working and leads to the new one.",
|
|
145
|
-
"history-empty": "This vacancy has never been published.",
|
|
146
|
-
version: "#:number",
|
|
147
|
-
"version-live": "On the site",
|
|
148
|
-
"source-panel": "From the panel",
|
|
149
|
-
"source-mcp": "By an agent",
|
|
150
|
-
"source-import": "Imported",
|
|
151
|
-
"restore-title": "Restore version :number?",
|
|
152
|
-
"restore-text": "It becomes the draft. The site keeps showing what is published until you publish this.",
|
|
153
|
-
"restore-version": "Restore",
|
|
154
|
-
"restored-version": "Version :number is now the draft."
|
|
155
|
-
},
|
|
156
|
-
category: {
|
|
157
|
-
new: "New category",
|
|
158
|
-
empty: "No categories yet.",
|
|
159
|
-
"empty-help": "A category is a group of vacancies — development, sales — and a filter of the list on the site. It has no page of its own.",
|
|
160
|
-
order: "Drag to change the order of the groups on the site.",
|
|
161
|
-
hidden: "Hidden from the site",
|
|
162
|
-
"no-page": "A group, with no page of its own",
|
|
163
|
-
vacancies: "Vacancies: :count",
|
|
164
|
-
"show-vacancies": "Show its vacancies",
|
|
165
|
-
"delete-blocked": "This category still holds vacancies. Move them first.",
|
|
166
|
-
"delete-text": "It goes to the bin. Its vacancies stay.",
|
|
167
|
-
deleted: "The category is in the bin.",
|
|
168
|
-
saved: "The category is saved.",
|
|
169
|
-
"field-title": "Title",
|
|
170
|
-
"field-slug": "Key",
|
|
171
|
-
"field-slug-help": "In the address of the filter: ?category=… Latin letters, digits and hyphens."
|
|
172
|
-
},
|
|
173
|
-
vacancy: {
|
|
174
|
-
workplace: {
|
|
175
|
-
onsite: "On site",
|
|
176
|
-
remote: "Remote",
|
|
177
|
-
hybrid: "Hybrid"
|
|
178
|
-
},
|
|
179
|
-
employment: {
|
|
180
|
-
FULL_TIME: "Full-time",
|
|
181
|
-
PART_TIME: "Part-time",
|
|
182
|
-
CONTRACTOR: "Contract",
|
|
183
|
-
TEMPORARY: "Temporary",
|
|
184
|
-
INTERN: "Internship",
|
|
185
|
-
VOLUNTEER: "Volunteer",
|
|
186
|
-
PER_DIEM: "Per day",
|
|
187
|
-
OTHER: "Other"
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
function qt(u) {
|
|
192
|
-
return `vacancy.employment.${u}`;
|
|
193
|
-
}
|
|
194
|
-
const Ee = /* @__PURE__ */ new WeakSet();
|
|
195
|
-
function me() {
|
|
196
|
-
try {
|
|
197
|
-
const { i18n: u } = de();
|
|
198
|
-
Ee.has(u) || (u.defaults("webx-vacancies", Et), Ee.add(u));
|
|
199
|
-
} catch {
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
const Ot = /* @__PURE__ */ ye({
|
|
203
|
-
__name: "VacancyCreateDialog",
|
|
204
|
-
setup(u) {
|
|
205
|
-
const { open: d, resolve: f, dismiss: v } = ft(), l = de(), m = fe(l);
|
|
206
|
-
me();
|
|
207
|
-
const a = ce("webx-vacancies"), N = C(""), n = C(!1), k = C({}), I = ot("field");
|
|
208
|
-
qe(async () => {
|
|
209
|
-
await rt(), I.value?.querySelector("input")?.focus();
|
|
210
|
-
});
|
|
211
|
-
async function M() {
|
|
212
|
-
if (!(N.value.trim() === "" || n.value)) {
|
|
213
|
-
n.value = !0, k.value = {};
|
|
214
|
-
try {
|
|
215
|
-
f((await m.create({ title: N.value.trim() })).vacancy);
|
|
216
|
-
} catch (q) {
|
|
217
|
-
k.value = q.body?.errors ?? {};
|
|
218
|
-
} finally {
|
|
219
|
-
n.value = !1;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
return (q, i) => (y(), $(e(mt), {
|
|
224
|
-
open: e(d),
|
|
225
|
-
"onUpdate:open": i[2] || (i[2] = (x) => ct(d) ? d.value = x : null),
|
|
226
|
-
title: e(a)("panel.new-title"),
|
|
227
|
-
width: 440
|
|
228
|
-
}, {
|
|
229
|
-
footer: c(() => [
|
|
230
|
-
p(e(gt), { size: "sm" }, {
|
|
231
|
-
default: c(() => [
|
|
232
|
-
p(e(ae), {
|
|
233
|
-
variant: "outline",
|
|
234
|
-
onClick: i[1] || (i[1] = (x) => e(v)())
|
|
235
|
-
}, {
|
|
236
|
-
default: c(() => [
|
|
237
|
-
V(_(e(a)("panel.cancel")), 1)
|
|
238
|
-
]),
|
|
239
|
-
_: 1
|
|
240
|
-
}),
|
|
241
|
-
p(e(ae), {
|
|
242
|
-
type: "primary",
|
|
243
|
-
loading: n.value,
|
|
244
|
-
disabled: N.value.trim() === "",
|
|
245
|
-
onClick: M
|
|
246
|
-
}, {
|
|
247
|
-
default: c(() => [
|
|
248
|
-
V(_(e(a)("panel.create")), 1)
|
|
249
|
-
]),
|
|
250
|
-
_: 1
|
|
251
|
-
}, 8, ["loading", "disabled"])
|
|
252
|
-
]),
|
|
253
|
-
_: 1
|
|
254
|
-
})
|
|
255
|
-
]),
|
|
256
|
-
default: c(() => [
|
|
257
|
-
p(e($e), {
|
|
258
|
-
label: e(a)("panel.field-title"),
|
|
259
|
-
error: k.value.title?.[0] ?? k.value.slug?.[0],
|
|
260
|
-
required: ""
|
|
261
|
-
}, {
|
|
262
|
-
default: c(() => [
|
|
263
|
-
D("div", {
|
|
264
|
-
ref_key: "field",
|
|
265
|
-
ref: I
|
|
266
|
-
}, [
|
|
267
|
-
p(e(Me), {
|
|
268
|
-
modelValue: N.value,
|
|
269
|
-
"onUpdate:modelValue": i[0] || (i[0] = (x) => N.value = x),
|
|
270
|
-
"aria-label": e(a)("panel.field-title"),
|
|
271
|
-
onKeyup: ut(M, ["enter"])
|
|
272
|
-
}, null, 8, ["modelValue", "aria-label"])
|
|
273
|
-
], 512)
|
|
274
|
-
]),
|
|
275
|
-
_: 1
|
|
276
|
-
}, 8, ["label", "error"])
|
|
277
|
-
]),
|
|
278
|
-
_: 1
|
|
279
|
-
}, 8, ["open", "title"]));
|
|
280
|
-
}
|
|
281
|
-
}), Dt = { class: "wx-vacancies" }, At = { class: "wx-vacancies__bar" }, Pt = { class: "wx-vacancies__filters" }, zt = {
|
|
282
|
-
key: 0,
|
|
283
|
-
class: "wx-vacancies__applied"
|
|
284
|
-
}, Mt = { class: "wx-vacancy-row__name" }, Lt = { class: "wx-vacancy-row__title" }, Ft = { class: "wx-vacancy-row__address" }, Ut = { class: "wx-vacancy-row__facts" }, Bt = { class: "wx-vacancy-row__where" }, Ht = {
|
|
285
|
-
key: 0,
|
|
286
|
-
class: "wx-vacancy-row__employment"
|
|
287
|
-
}, Kt = { class: "wx-vacancy-row__until" }, jt = { class: "wx-vacancy-row__state" }, Yt = /* @__PURE__ */ ye({
|
|
288
|
-
__name: "VacanciesPage",
|
|
289
|
-
props: {
|
|
290
|
-
base: { default: "/vacancies" }
|
|
291
|
-
},
|
|
292
|
-
setup(u) {
|
|
293
|
-
const d = u, f = de(), v = fe(f), l = Pe(), m = ze();
|
|
294
|
-
me();
|
|
295
|
-
const a = ce("webx-vacancies"), N = Ve(), n = C([]), k = C({ categories: [] }), I = C(!0), M = bt(Ot), q = h(() => f.can("vacancies.manage")), i = h(
|
|
296
|
-
() => f.state.manifest?.modules.find((t) => t.id === "vacancies")?.title ?? a("module.vacancies")
|
|
297
|
-
), x = h(() => f.i18n.state.locale), b = h({
|
|
298
|
-
get: () => typeof l.query.view == "string" ? l.query.view : "",
|
|
299
|
-
set: (t) => {
|
|
300
|
-
m.replace({
|
|
301
|
-
query: { ...l.query, view: t === "" ? void 0 : String(t) }
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}), T = h(() => b.value === "trashed"), A = h(() => b.value === "closed" ? "closed" : b.value === "all" ? "all" : "open"), B = h(() => {
|
|
305
|
-
const t = l.query.category;
|
|
306
|
-
return typeof t == "string" && t !== "" && Number(t) || null;
|
|
307
|
-
}), E = h(
|
|
308
|
-
() => typeof l.query.status == "string" ? l.query.status : ""
|
|
309
|
-
), S = h(() => typeof l.query.q == "string" ? l.query.q : ""), G = C(S.value), Q = h(() => [
|
|
310
|
-
{ value: "", label: a("panel.view-open") },
|
|
311
|
-
{ value: "closed", label: a("panel.view-closed") },
|
|
312
|
-
{ value: "all", label: a("panel.view-all") },
|
|
313
|
-
{ value: "trashed", label: a("panel.bin"), icon: "trash" }
|
|
314
|
-
]), L = h(
|
|
315
|
-
() => ["published", "draft", "unpublished"].map((t) => ({
|
|
316
|
-
value: t,
|
|
317
|
-
label: a(`panel.status-${t}`)
|
|
318
|
-
}))
|
|
319
|
-
), W = h(
|
|
320
|
-
() => S.value.trim() === "" && B.value === null && E.value === ""
|
|
321
|
-
), H = h(() => A.value !== "closed" && !T.value), ve = h(() => q.value && H.value && W.value), le = h(() => H.value ? a(W.value ? "panel.order-all" : "panel.order-locked") : a("panel.order-closed")), O = h(() => S.value !== "" ? a("panel.empty-search") : T.value ? a("panel.empty-bin") : A.value === "closed" ? a("panel.empty-closed") : A.value === "all" ? a("panel.empty") : a("panel.empty-open")), X = h(() => {
|
|
322
|
-
const t = [];
|
|
323
|
-
E.value !== "" && t.push({
|
|
324
|
-
key: "status",
|
|
325
|
-
label: `${a("panel.filter-status")}: ${a(`panel.status-${E.value}`)}`,
|
|
326
|
-
clear: () => Z("status", void 0)
|
|
327
|
-
});
|
|
328
|
-
const o = k.value.categories.find((r) => r.id === B.value);
|
|
329
|
-
return o && t.push({
|
|
330
|
-
key: "category",
|
|
331
|
-
label: `${a("panel.filter-category")}: ${o.title}`,
|
|
332
|
-
clear: () => Z("category", void 0)
|
|
333
|
-
}), t;
|
|
334
|
-
});
|
|
335
|
-
async function K() {
|
|
336
|
-
I.value = !0;
|
|
337
|
-
try {
|
|
338
|
-
const t = await v.list({
|
|
339
|
-
state: A.value,
|
|
340
|
-
q: S.value,
|
|
341
|
-
category: B.value,
|
|
342
|
-
status: T.value ? "" : E.value,
|
|
343
|
-
trashed: T.value
|
|
344
|
-
});
|
|
345
|
-
n.value = t.data, k.value = t.filters;
|
|
346
|
-
} catch (t) {
|
|
347
|
-
w.danger(N(t));
|
|
348
|
-
} finally {
|
|
349
|
-
I.value = !1;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
ue([b, B, E, S], () => {
|
|
353
|
-
K();
|
|
354
|
-
}), K();
|
|
355
|
-
let se;
|
|
356
|
-
ue(G, (t) => {
|
|
357
|
-
clearTimeout(se), se = setTimeout(() => {
|
|
358
|
-
m.replace({ query: { ...l.query, q: t.trim() === "" ? void 0 : t } });
|
|
359
|
-
}, 300);
|
|
360
|
-
}), Oe(() => clearTimeout(se));
|
|
361
|
-
function Z(t, o) {
|
|
362
|
-
m.replace({
|
|
363
|
-
query: {
|
|
364
|
-
...l.query,
|
|
365
|
-
[t]: typeof o == "number" || typeof o == "string" && o !== "" ? String(o) : void 0
|
|
366
|
-
}
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
function j() {
|
|
370
|
-
const t = { ...l.query };
|
|
371
|
-
delete t.category, delete t.status, m.replace({ query: t });
|
|
372
|
-
}
|
|
373
|
-
function ie(t) {
|
|
374
|
-
m.push({ path: `${d.base}/${t.id}`, query: { ...l.query } });
|
|
375
|
-
}
|
|
376
|
-
async function ee() {
|
|
377
|
-
const t = await M({});
|
|
378
|
-
t && ie(t);
|
|
379
|
-
}
|
|
380
|
-
async function ge() {
|
|
381
|
-
try {
|
|
382
|
-
await v.reorder(n.value.map((t) => t.id));
|
|
383
|
-
} catch (t) {
|
|
384
|
-
w.danger(N(t, a("panel.reorder-failed"))), await K();
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
const oe = (t) => t.status === "published" || t.status === "modified";
|
|
388
|
-
function U(t) {
|
|
389
|
-
if (!q.value) return [];
|
|
390
|
-
if (T.value)
|
|
391
|
-
return [
|
|
392
|
-
{
|
|
393
|
-
key: "restore",
|
|
394
|
-
icon: "refresh",
|
|
395
|
-
label: a("panel.restore"),
|
|
396
|
-
run: () => {
|
|
397
|
-
ke(t);
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
];
|
|
401
|
-
const o = [
|
|
402
|
-
{ key: "open", icon: "edit", label: a("panel.open"), run: () => ie(t) },
|
|
403
|
-
{
|
|
404
|
-
key: "duplicate",
|
|
405
|
-
icon: "copy",
|
|
406
|
-
label: a("panel.duplicate"),
|
|
407
|
-
run: () => {
|
|
408
|
-
be(t);
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
];
|
|
412
|
-
return t.url && t.status !== "draft" && o.push({
|
|
413
|
-
key: "site",
|
|
414
|
-
icon: "external-link",
|
|
415
|
-
label: a("panel.open-on-site"),
|
|
416
|
-
href: t.url
|
|
417
|
-
}), oe(t) && t.closed_reason === "manual" ? o.push({
|
|
418
|
-
key: "reopen",
|
|
419
|
-
icon: "refresh",
|
|
420
|
-
label: a("panel.reopen"),
|
|
421
|
-
run: () => {
|
|
422
|
-
_e(t);
|
|
423
|
-
}
|
|
424
|
-
}) : oe(t) && t.closed_reason === null && o.push({
|
|
425
|
-
key: "close",
|
|
426
|
-
icon: "lock",
|
|
427
|
-
label: a("panel.close"),
|
|
428
|
-
run: () => {
|
|
429
|
-
we(t);
|
|
430
|
-
}
|
|
431
|
-
}), o.push(
|
|
432
|
-
oe(t) ? {
|
|
433
|
-
key: "unpublish",
|
|
434
|
-
icon: "eye-off",
|
|
435
|
-
label: a("panel.unpublish"),
|
|
436
|
-
run: () => {
|
|
437
|
-
te(() => v.unpublish(t.id), a("panel.unpublished-done"));
|
|
438
|
-
}
|
|
439
|
-
} : {
|
|
440
|
-
key: "publish",
|
|
441
|
-
icon: "upload",
|
|
442
|
-
label: a("panel.publish"),
|
|
443
|
-
run: () => {
|
|
444
|
-
te(() => v.publish(t.id), a("panel.published"));
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
), o.push({
|
|
448
|
-
key: "delete",
|
|
449
|
-
icon: "trash",
|
|
450
|
-
label: a("panel.delete"),
|
|
451
|
-
danger: !0,
|
|
452
|
-
run: () => {
|
|
453
|
-
xe(t);
|
|
454
|
-
}
|
|
455
|
-
}), o;
|
|
456
|
-
}
|
|
457
|
-
async function be(t) {
|
|
458
|
-
try {
|
|
459
|
-
const o = await v.duplicate(t.id);
|
|
460
|
-
w.success(a("panel.duplicated")), ie(o.vacancy);
|
|
461
|
-
} catch (o) {
|
|
462
|
-
w.danger(N(o));
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
async function we(t) {
|
|
466
|
-
if (t.status === "modified") {
|
|
467
|
-
w.warning(a("panel.close-edits"));
|
|
468
|
-
return;
|
|
469
|
-
}
|
|
470
|
-
await J({
|
|
471
|
-
title: a("panel.close-title", { title: t.title }),
|
|
472
|
-
message: a("panel.close-text"),
|
|
473
|
-
confirmText: a("panel.close"),
|
|
474
|
-
cancelText: a("panel.cancel")
|
|
475
|
-
}) && await te(() => v.close(t.id), a("panel.closed"));
|
|
476
|
-
}
|
|
477
|
-
async function _e(t) {
|
|
478
|
-
if (t.status === "modified") {
|
|
479
|
-
w.warning(a("panel.close-edits"));
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
if (await J({
|
|
483
|
-
title: a("panel.reopen-title", { title: t.title }),
|
|
484
|
-
message: a("panel.reopen-text"),
|
|
485
|
-
confirmText: a("panel.reopen"),
|
|
486
|
-
cancelText: a("panel.cancel")
|
|
487
|
-
}))
|
|
488
|
-
try {
|
|
489
|
-
(await v.reopen(t.id)).closed ? w.warning(a("panel.reopen-expired")) : w.success(a("panel.reopened"));
|
|
490
|
-
} catch (r) {
|
|
491
|
-
w.danger(N(r));
|
|
492
|
-
} finally {
|
|
493
|
-
await K();
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
async function xe(t) {
|
|
497
|
-
await J({
|
|
498
|
-
title: a("panel.delete-title", { title: t.title }),
|
|
499
|
-
message: a("panel.delete-text"),
|
|
500
|
-
confirmText: a("panel.delete"),
|
|
501
|
-
cancelText: a("panel.cancel"),
|
|
502
|
-
tone: "danger"
|
|
503
|
-
}) && await te(() => v.remove(t.id), a("panel.deleted"));
|
|
504
|
-
}
|
|
505
|
-
async function ke(t) {
|
|
506
|
-
await te(() => v.restore(t.id), a("panel.restored"));
|
|
507
|
-
}
|
|
508
|
-
async function te(t, o) {
|
|
509
|
-
try {
|
|
510
|
-
await t(), w.success(o);
|
|
511
|
-
} catch (r) {
|
|
512
|
-
w.danger(N(r));
|
|
513
|
-
} finally {
|
|
514
|
-
await K();
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
function pe(t) {
|
|
518
|
-
return t === "published" || t === "modified" ? "success" : "default";
|
|
519
|
-
}
|
|
520
|
-
function Te(t) {
|
|
521
|
-
return T.value ? "—" : t.path === null ? a("panel.no-address") : `/${t.path}`;
|
|
522
|
-
}
|
|
523
|
-
function s(t) {
|
|
524
|
-
if (t.workplace === "remote") return a("vacancy.workplace.remote");
|
|
525
|
-
const o = t.city !== "" ? t.city : a("panel.no-city");
|
|
526
|
-
return t.workplace === "hybrid" ? `${o} · ${a("vacancy.workplace.hybrid")}` : o;
|
|
527
|
-
}
|
|
528
|
-
function g(t) {
|
|
529
|
-
return t.employment_types.map((o) => a(qt(o))).join(", ");
|
|
530
|
-
}
|
|
531
|
-
function F(t) {
|
|
532
|
-
return t.closed && A.value === "all" && !T.value;
|
|
533
|
-
}
|
|
534
|
-
const P = h(
|
|
535
|
-
() => q.value ? [{ key: "new", label: a("panel.new"), icon: "plus", primary: !0, run: () => {
|
|
536
|
-
ee();
|
|
537
|
-
} }] : []
|
|
538
|
-
);
|
|
539
|
-
return (t, o) => (y(), z("div", Dt, [
|
|
540
|
-
p(e(Ke), {
|
|
541
|
-
view: b.value,
|
|
542
|
-
"onUpdate:view": o[4] || (o[4] = (r) => b.value = r),
|
|
543
|
-
title: i.value,
|
|
544
|
-
views: Q.value,
|
|
545
|
-
actions: P.value,
|
|
546
|
-
padding: "sm"
|
|
547
|
-
}, {
|
|
548
|
-
default: c(() => [
|
|
549
|
-
D("div", At, [
|
|
550
|
-
p(e(Me), {
|
|
551
|
-
modelValue: G.value,
|
|
552
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => G.value = r),
|
|
553
|
-
class: "wx-vacancies__search",
|
|
554
|
-
size: "sm",
|
|
555
|
-
clearable: "",
|
|
556
|
-
placeholder: e(a)("panel.search"),
|
|
557
|
-
"aria-label": e(a)("panel.search")
|
|
558
|
-
}, {
|
|
559
|
-
prefix: c(() => [
|
|
560
|
-
p(e(re), {
|
|
561
|
-
name: "search",
|
|
562
|
-
size: "sm"
|
|
563
|
-
})
|
|
564
|
-
]),
|
|
565
|
-
_: 1
|
|
566
|
-
}, 8, ["modelValue", "placeholder", "aria-label"]),
|
|
567
|
-
p(e(wt), {
|
|
568
|
-
title: e(a)("panel.filters"),
|
|
569
|
-
width: 280,
|
|
570
|
-
side: "bottom",
|
|
571
|
-
align: "end"
|
|
572
|
-
}, {
|
|
573
|
-
trigger: c(() => [
|
|
574
|
-
p(e(_t), {
|
|
575
|
-
class: "wx-vacancies__funnel",
|
|
576
|
-
value: X.value.length,
|
|
577
|
-
hidden: X.value.length === 0,
|
|
578
|
-
type: "primary",
|
|
579
|
-
label: e(a)("panel.filters")
|
|
580
|
-
}, {
|
|
581
|
-
default: c(() => [
|
|
582
|
-
p(e(xt), {
|
|
583
|
-
icon: "filter",
|
|
584
|
-
size: "sm",
|
|
585
|
-
title: e(a)("panel.filters")
|
|
586
|
-
}, null, 8, ["title"])
|
|
587
|
-
]),
|
|
588
|
-
_: 1
|
|
589
|
-
}, 8, ["value", "hidden", "label"])
|
|
590
|
-
]),
|
|
591
|
-
default: c(() => [
|
|
592
|
-
D("div", Pt, [
|
|
593
|
-
T.value ? R("", !0) : (y(), $(e($e), {
|
|
594
|
-
key: 0,
|
|
595
|
-
label: e(a)("panel.filter-status")
|
|
596
|
-
}, {
|
|
597
|
-
default: c(() => [
|
|
598
|
-
p(e(Ie), {
|
|
599
|
-
"model-value": E.value === "" ? null : E.value,
|
|
600
|
-
options: L.value,
|
|
601
|
-
placeholder: e(a)("panel.any-status"),
|
|
602
|
-
clearable: "",
|
|
603
|
-
size: "sm",
|
|
604
|
-
"onUpdate:modelValue": o[1] || (o[1] = (r) => Z("status", r))
|
|
605
|
-
}, null, 8, ["model-value", "options", "placeholder"])
|
|
606
|
-
]),
|
|
607
|
-
_: 1
|
|
608
|
-
}, 8, ["label"])),
|
|
609
|
-
p(e($e), {
|
|
610
|
-
label: e(a)("panel.filter-category")
|
|
611
|
-
}, {
|
|
612
|
-
default: c(() => [
|
|
613
|
-
p(e(Ie), {
|
|
614
|
-
"model-value": B.value,
|
|
615
|
-
options: k.value.categories.map((r) => ({ value: r.id, label: r.title })),
|
|
616
|
-
placeholder: e(a)("panel.any-category"),
|
|
617
|
-
clearable: "",
|
|
618
|
-
size: "sm",
|
|
619
|
-
"onUpdate:modelValue": o[2] || (o[2] = (r) => Z("category", r))
|
|
620
|
-
}, null, 8, ["model-value", "options", "placeholder"])
|
|
621
|
-
]),
|
|
622
|
-
_: 1
|
|
623
|
-
}, 8, ["label"]),
|
|
624
|
-
X.value.length > 0 ? (y(), $(e(ae), {
|
|
625
|
-
key: 1,
|
|
626
|
-
variant: "text",
|
|
627
|
-
size: "sm",
|
|
628
|
-
block: "",
|
|
629
|
-
onClick: j
|
|
630
|
-
}, {
|
|
631
|
-
icon: c(() => [
|
|
632
|
-
p(e(re), { name: "close" })
|
|
633
|
-
]),
|
|
634
|
-
default: c(() => [
|
|
635
|
-
V(" " + _(e(a)("panel.filters-reset")), 1)
|
|
636
|
-
]),
|
|
637
|
-
_: 1
|
|
638
|
-
})) : R("", !0)
|
|
639
|
-
])
|
|
640
|
-
]),
|
|
641
|
-
_: 1
|
|
642
|
-
}, 8, ["title"])
|
|
643
|
-
]),
|
|
644
|
-
X.value.length > 0 ? (y(), z("div", zt, [
|
|
645
|
-
p(e(je), { filters: X.value }, null, 8, ["filters"])
|
|
646
|
-
])) : R("", !0),
|
|
647
|
-
I.value && n.value.length === 0 ? (y(), $(e(he), {
|
|
648
|
-
key: 1,
|
|
649
|
-
class: "wx-vacancies__loading",
|
|
650
|
-
rows: 5
|
|
651
|
-
})) : n.value.length === 0 ? (y(), $(e(Le), {
|
|
652
|
-
key: 2,
|
|
653
|
-
title: O.value,
|
|
654
|
-
description: A.value === "all" && !T.value && W.value ? e(a)("panel.empty-help") : void 0
|
|
655
|
-
}, null, 8, ["title", "description"])) : (y(), z(ne, { key: 3 }, [
|
|
656
|
-
p(e(kt), {
|
|
657
|
-
modelValue: n.value,
|
|
658
|
-
"onUpdate:modelValue": o[3] || (o[3] = (r) => n.value = r),
|
|
659
|
-
class: De(["wx-vacancies__list", { "is-loading": I.value }]),
|
|
660
|
-
plain: "",
|
|
661
|
-
"item-key": "id",
|
|
662
|
-
handle: ve.value ? "grip" : "row",
|
|
663
|
-
"item-label": (r) => r.title,
|
|
664
|
-
disabled: !ve.value,
|
|
665
|
-
onMove: ge
|
|
666
|
-
}, {
|
|
667
|
-
default: c(({ item: r }) => [
|
|
668
|
-
(y(), $(dt(T.value ? "div" : "router-link"), vt({
|
|
669
|
-
class: ["wx-vacancy-row", { "is-closed": F(r) }]
|
|
670
|
-
}, T.value ? {} : { to: { path: `${d.base}/${r.id}`, query: e(l).query } }), {
|
|
671
|
-
default: c(() => [
|
|
672
|
-
D("span", Mt, [
|
|
673
|
-
D("span", Lt, _(r.title), 1),
|
|
674
|
-
D("span", Ft, [
|
|
675
|
-
V(_(Te(r)), 1),
|
|
676
|
-
T.value ? R("", !0) : (y(), $(e(Je), {
|
|
677
|
-
key: 0,
|
|
678
|
-
locale: r.address_locale
|
|
679
|
-
}, null, 8, ["locale"]))
|
|
680
|
-
])
|
|
681
|
-
]),
|
|
682
|
-
D("span", Ut, [
|
|
683
|
-
D("span", Bt, [
|
|
684
|
-
p(e(re), {
|
|
685
|
-
name: r.workplace === "remote" ? "monitor" : "map-pin",
|
|
686
|
-
size: "sm"
|
|
687
|
-
}, null, 8, ["name"]),
|
|
688
|
-
V(" " + _(s(r)), 1)
|
|
689
|
-
]),
|
|
690
|
-
r.employment_types.length > 0 ? (y(), z("span", Ht, _(g(r)), 1)) : R("", !0),
|
|
691
|
-
r.valid_through ? (y(), $(e(Ne), {
|
|
692
|
-
key: 1,
|
|
693
|
-
content: e(a)("panel.until-help", { date: e(Ue)(r.valid_through, x.value) })
|
|
694
|
-
}, {
|
|
695
|
-
default: c(() => [
|
|
696
|
-
D("span", Kt, [
|
|
697
|
-
p(e(re), {
|
|
698
|
-
name: "calendar",
|
|
699
|
-
size: "sm"
|
|
700
|
-
}),
|
|
701
|
-
V(" " + _(e(a)("panel.until", { date: e(Rt)(r.valid_through, x.value) })), 1)
|
|
702
|
-
])
|
|
703
|
-
]),
|
|
704
|
-
_: 2
|
|
705
|
-
}, 1032, ["content"])) : R("", !0)
|
|
706
|
-
]),
|
|
707
|
-
D("span", jt, [
|
|
708
|
-
(y(!0), z(ne, null, Ae(r.categories, (Ce) => (y(), $(e(Y), {
|
|
709
|
-
key: Ce.id,
|
|
710
|
-
size: "sm",
|
|
711
|
-
round: ""
|
|
712
|
-
}, {
|
|
713
|
-
default: c(() => [
|
|
714
|
-
V(_(Ce.title), 1)
|
|
715
|
-
]),
|
|
716
|
-
_: 2
|
|
717
|
-
}, 1024))), 128)),
|
|
718
|
-
r.closed_reason ? (y(), $(e(Ne), {
|
|
719
|
-
key: 0,
|
|
720
|
-
content: e(a)(`panel.closed-${r.closed_reason}-help`)
|
|
721
|
-
}, {
|
|
722
|
-
default: c(() => [
|
|
723
|
-
p(e(Y), {
|
|
724
|
-
type: "warning",
|
|
725
|
-
size: "sm",
|
|
726
|
-
round: ""
|
|
727
|
-
}, {
|
|
728
|
-
default: c(() => [
|
|
729
|
-
V(_(e(a)(`panel.closed-${r.closed_reason}`)), 1)
|
|
730
|
-
]),
|
|
731
|
-
_: 2
|
|
732
|
-
}, 1024)
|
|
733
|
-
]),
|
|
734
|
-
_: 2
|
|
735
|
-
}, 1032, ["content"])) : R("", !0),
|
|
736
|
-
p(e(Y), {
|
|
737
|
-
type: pe(r.status),
|
|
738
|
-
dot: "",
|
|
739
|
-
size: "sm"
|
|
740
|
-
}, {
|
|
741
|
-
default: c(() => [
|
|
742
|
-
V(_(e(a)(`panel.status-${r.status}`)), 1)
|
|
743
|
-
]),
|
|
744
|
-
_: 2
|
|
745
|
-
}, 1032, ["type"]),
|
|
746
|
-
r.status === "modified" ? (y(), $(e(Y), {
|
|
747
|
-
key: 1,
|
|
748
|
-
type: "primary",
|
|
749
|
-
size: "sm",
|
|
750
|
-
round: ""
|
|
751
|
-
}, {
|
|
752
|
-
default: c(() => [
|
|
753
|
-
V(_(e(a)("panel.edits")), 1)
|
|
754
|
-
]),
|
|
755
|
-
_: 1
|
|
756
|
-
})) : R("", !0)
|
|
757
|
-
])
|
|
758
|
-
]),
|
|
759
|
-
_: 2
|
|
760
|
-
}, 1040, ["class"]))
|
|
761
|
-
]),
|
|
762
|
-
actions: c(({ item: r }) => [
|
|
763
|
-
p(e(Ye), {
|
|
764
|
-
actions: U(r),
|
|
765
|
-
label: r.title
|
|
766
|
-
}, null, 8, ["actions", "label"])
|
|
767
|
-
]),
|
|
768
|
-
_: 1
|
|
769
|
-
}, 8, ["modelValue", "class", "handle", "item-label", "disabled"]),
|
|
770
|
-
q.value && !T.value ? (y(), $(e(Tt), {
|
|
771
|
-
key: 0,
|
|
772
|
-
class: "wx-vacancies__note",
|
|
773
|
-
type: "info",
|
|
774
|
-
description: le.value
|
|
775
|
-
}, null, 8, ["description"])) : R("", !0)
|
|
776
|
-
], 64))
|
|
777
|
-
]),
|
|
778
|
-
_: 1
|
|
779
|
-
}, 8, ["view", "title", "views", "actions"])
|
|
780
|
-
]));
|
|
781
|
-
}
|
|
782
|
-
}), We = (u, d) => {
|
|
783
|
-
const f = u.__vccOpts || u;
|
|
784
|
-
for (const [v, l] of d)
|
|
785
|
-
f[v] = l;
|
|
786
|
-
return f;
|
|
787
|
-
}, Jt = /* @__PURE__ */ We(Yt, [["__scopeId", "data-v-491c2b10"]]), Be = /* @__PURE__ */ Symbol("wx-vacancy-editor");
|
|
788
|
-
function Gt(u) {
|
|
789
|
-
pt(Be, u);
|
|
790
|
-
}
|
|
791
|
-
function Qt() {
|
|
792
|
-
return ht(Be, null);
|
|
793
|
-
}
|
|
794
|
-
const Xt = { class: "wx-vacancy-editor__word" }, Zt = 1200, ea = /* @__PURE__ */ ye({
|
|
795
|
-
__name: "VacancyEditorPage",
|
|
796
|
-
props: {
|
|
797
|
-
base: { default: "/vacancies" }
|
|
798
|
-
},
|
|
799
|
-
setup(u) {
|
|
800
|
-
const d = u, f = de(), v = fe(f), l = Pe(), m = ze(), a = $t(), N = Ge();
|
|
801
|
-
me();
|
|
802
|
-
const n = ce("webx-vacancies"), k = ce("webx-admin"), I = Ve(), M = h(() => Number(l.params.id)), q = h(() => d.base), i = C(null), x = C({}), b = C(""), T = C(null), A = C(null), B = C(!0), E = C(!1), S = C(!1), G = C({}), Q = C(""), L = h(() => f.can("vacancies.manage")), W = Qe({
|
|
803
|
-
entity: "vacancies",
|
|
804
|
-
id: () => i.value?.id,
|
|
805
|
-
values: x,
|
|
806
|
-
revision: b,
|
|
807
|
-
read: async () => {
|
|
808
|
-
const s = await v.get(M.value);
|
|
809
|
-
return { values: s.values, revision: s.revision };
|
|
810
|
-
},
|
|
811
|
-
adopt: (s) => {
|
|
812
|
-
Q.value = JSON.stringify(s.values);
|
|
813
|
-
},
|
|
814
|
-
// Published or restored by somebody else: the badge and the address follow, and the form
|
|
815
|
-
// stays as it is.
|
|
816
|
-
refresh: () => ie(),
|
|
817
|
-
restore: async () => {
|
|
818
|
-
i.value && await v.restore(i.value.id);
|
|
819
|
-
},
|
|
820
|
-
canWrite: () => L.value,
|
|
821
|
-
busy: () => E.value,
|
|
822
|
-
screen: "vacancies.form"
|
|
823
|
-
}), H = W.conflict, ve = h(() => !L.value || S.value), le = h(() => JSON.stringify(x.value)), O = h(() => Q.value !== "" && le.value !== Q.value), X = h(() => E.value ? "saving" : O.value ? "unsaved" : "saved"), K = h(() => {
|
|
824
|
-
const s = x.value.title;
|
|
825
|
-
return Vt(s, a.active.value, i.value?.title ?? "");
|
|
826
|
-
}), se = h(() => {
|
|
827
|
-
const s = i.value;
|
|
828
|
-
if (!s) return "";
|
|
829
|
-
const g = [];
|
|
830
|
-
return s.valid_through !== null && !s.closed && g.push(
|
|
831
|
-
n("editor.open-until", { date: Ue(s.valid_through, f.i18n.state.locale) })
|
|
832
|
-
), (s.status === "published" || s.status === "modified") && g.push(n("editor.live-since", { date: N.short(s.published_at) })), g.join(" · ");
|
|
833
|
-
});
|
|
834
|
-
Xe({ type: "vacancy", id: h(() => i.value?.id ?? null) }), Ze({
|
|
835
|
-
values: x,
|
|
836
|
-
prefix: T,
|
|
837
|
-
path: h(() => i.value?.path),
|
|
838
|
-
moving: () => n("editor.address-moving")
|
|
839
|
-
}), Gt({ vacancy: i, canManage: L.value, reload: () => j(!0) });
|
|
840
|
-
function Z(s) {
|
|
841
|
-
const g = s.values;
|
|
842
|
-
i.value = s.vacancy, x.value = g, b.value = s.revision, T.value = s.prefix, A.value = s.preview_url, Q.value = JSON.stringify(g), W.opened(g), H.value = null;
|
|
843
|
-
}
|
|
844
|
-
async function j(s = !1) {
|
|
845
|
-
s || (B.value = !0);
|
|
846
|
-
try {
|
|
847
|
-
Z(await v.get(M.value));
|
|
848
|
-
} catch (g) {
|
|
849
|
-
w.danger(I(g)), m.push(q.value);
|
|
850
|
-
} finally {
|
|
851
|
-
B.value = !1;
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
async function ie() {
|
|
855
|
-
try {
|
|
856
|
-
const s = await v.get(M.value);
|
|
857
|
-
i.value = s.vacancy, T.value = s.prefix, A.value = s.preview_url;
|
|
858
|
-
} catch {
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
let ee;
|
|
862
|
-
function ge() {
|
|
863
|
-
!L.value || H.value || !O.value || W.stopped.value || (clearTimeout(ee), ee = setTimeout(() => {
|
|
864
|
-
U();
|
|
865
|
-
}, Zt));
|
|
866
|
-
}
|
|
867
|
-
function oe() {
|
|
868
|
-
!L.value || H.value || !O.value || E.value || W.stopped.value || (clearTimeout(ee), U());
|
|
869
|
-
}
|
|
870
|
-
async function U() {
|
|
871
|
-
if (!i.value || E.value || !L.value) return;
|
|
872
|
-
clearTimeout(ee);
|
|
873
|
-
const s = le.value, g = x.value;
|
|
874
|
-
E.value = !0, G.value = {};
|
|
875
|
-
let F = !1;
|
|
876
|
-
try {
|
|
877
|
-
const P = await v.save(i.value.id, { values: g, revision: b.value });
|
|
878
|
-
i.value = P.vacancy, b.value = P.revision, T.value = P.prefix, A.value = P.preview_url, H.value = null, le.value === s && (Q.value = s), W.opened(g);
|
|
879
|
-
} catch (P) {
|
|
880
|
-
const t = P;
|
|
881
|
-
if (t.status === 409 && t.body?.data) {
|
|
882
|
-
const o = t.body.data;
|
|
883
|
-
W.refused({
|
|
884
|
-
values: o.values,
|
|
885
|
-
revision: o.revision,
|
|
886
|
-
changed: t.body.changed
|
|
887
|
-
}) && (i.value = o.vacancy, F = !0);
|
|
888
|
-
} else t.body?.errors ? (G.value = t.body.errors, w.danger(n("editor.save-failed"))) : await W.failed(P) || w.danger(I(P));
|
|
889
|
-
} finally {
|
|
890
|
-
E.value = !1;
|
|
891
|
-
}
|
|
892
|
-
F && await U();
|
|
893
|
-
}
|
|
894
|
-
async function be() {
|
|
895
|
-
await j(!0);
|
|
896
|
-
}
|
|
897
|
-
async function we() {
|
|
898
|
-
if (!(!i.value || !await J({
|
|
899
|
-
title: k("editor.discard-title"),
|
|
900
|
-
message: k("editor.discard-text"),
|
|
901
|
-
confirmText: n("editor.discard"),
|
|
902
|
-
// Not «Cancel»: beside «Discard changes» the two read as the same word.
|
|
903
|
-
cancelText: k("editor.keep-changes"),
|
|
904
|
-
tone: "danger"
|
|
905
|
-
}))) {
|
|
906
|
-
S.value = !0;
|
|
907
|
-
try {
|
|
908
|
-
Z(await v.discard(i.value.id)), w.success(n("editor.discarded"));
|
|
909
|
-
} catch (g) {
|
|
910
|
-
w.danger(I(g));
|
|
911
|
-
} finally {
|
|
912
|
-
S.value = !1;
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
}
|
|
916
|
-
async function _e() {
|
|
917
|
-
if (O.value && await U(), H.value || O.value || !i.value) return;
|
|
918
|
-
const s = await W.beforePublish();
|
|
919
|
-
if (!s) return;
|
|
920
|
-
const g = i.value, F = g.next_path ?? g.path, P = g.next_path != null && g.path !== null ? ` ${k("editor.publish-moves", { old: `/${g.path}` })}` : "";
|
|
921
|
-
if (s.asked || await J({
|
|
922
|
-
title: n("editor.publish-title", { title: K.value || g.title }),
|
|
923
|
-
message: F === null ? n("editor.publish-nowhere") : n("editor.publish-text", { address: `/${F}` }) + P,
|
|
924
|
-
confirmText: n("panel.publish"),
|
|
925
|
-
cancelText: n("panel.cancel")
|
|
926
|
-
})) {
|
|
927
|
-
S.value = !0;
|
|
928
|
-
try {
|
|
929
|
-
await v.publish(g.id, s.revision), await j(!0), w.success(n("panel.published"));
|
|
930
|
-
} catch (o) {
|
|
931
|
-
await W.failed(o) || w.danger(I(o));
|
|
932
|
-
} finally {
|
|
933
|
-
S.value = !1;
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
async function xe() {
|
|
938
|
-
const s = i.value;
|
|
939
|
-
if (s && (O.value && await U(), !(H.value || O.value))) {
|
|
940
|
-
S.value = !0;
|
|
941
|
-
try {
|
|
942
|
-
const g = await v.duplicate(s.id);
|
|
943
|
-
w.success(n("panel.duplicated")), await m.push({ path: `${q.value}/${g.vacancy.id}`, query: { ...l.query } });
|
|
944
|
-
} catch (g) {
|
|
945
|
-
w.danger(I(g));
|
|
946
|
-
} finally {
|
|
947
|
-
S.value = !1;
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
}
|
|
951
|
-
async function ke() {
|
|
952
|
-
const s = i.value;
|
|
953
|
-
if (!(!s || !await J({
|
|
954
|
-
title: k("editor.unpublish-title"),
|
|
955
|
-
message: k("editor.unpublish-text"),
|
|
956
|
-
confirmText: k("editor.unpublish"),
|
|
957
|
-
cancelText: k("editor.keep-published")
|
|
958
|
-
}))) {
|
|
959
|
-
S.value = !0;
|
|
960
|
-
try {
|
|
961
|
-
await v.unpublish(s.id), await j(!0), w.success(k("editor.unpublished"));
|
|
962
|
-
} catch (F) {
|
|
963
|
-
w.danger(I(F));
|
|
964
|
-
} finally {
|
|
965
|
-
S.value = !1;
|
|
966
|
-
}
|
|
967
|
-
}
|
|
968
|
-
}
|
|
969
|
-
function te() {
|
|
970
|
-
const s = i.value?.status;
|
|
971
|
-
return s === "published" || s === "modified" ? "success" : "default";
|
|
972
|
-
}
|
|
973
|
-
function pe(s) {
|
|
974
|
-
O.value && s.preventDefault();
|
|
975
|
-
}
|
|
976
|
-
ue(le, ge), ue(M, () => {
|
|
977
|
-
j();
|
|
978
|
-
}), qe(() => {
|
|
979
|
-
j(), window.addEventListener("beforeunload", pe);
|
|
980
|
-
}), Oe(() => {
|
|
981
|
-
clearTimeout(ee), window.removeEventListener("beforeunload", pe);
|
|
982
|
-
}), yt(async () => !O.value || !L.value || (await U(), !O.value) ? !0 : await J({
|
|
983
|
-
title: n("editor.leave-title"),
|
|
984
|
-
message: n("editor.leave-text"),
|
|
985
|
-
confirmText: n("editor.leave"),
|
|
986
|
-
cancelText: n("panel.cancel"),
|
|
987
|
-
tone: "danger"
|
|
988
|
-
}));
|
|
989
|
-
const Te = h(() => {
|
|
990
|
-
const s = [];
|
|
991
|
-
return A.value && s.push({ key: "preview", label: n("editor.preview"), icon: "eye", href: A.value }), i.value?.url && i.value.status !== "draft" && s.push({
|
|
992
|
-
key: "site",
|
|
993
|
-
label: n("panel.open-on-site"),
|
|
994
|
-
icon: "link",
|
|
995
|
-
href: i.value.url
|
|
996
|
-
}), L.value && (i.value?.status === "published" || i.value?.status === "modified") && s.push({
|
|
997
|
-
key: "unpublish",
|
|
998
|
-
label: k("editor.unpublish"),
|
|
999
|
-
icon: "eye-off",
|
|
1000
|
-
run: () => {
|
|
1001
|
-
ke();
|
|
1002
|
-
}
|
|
1003
|
-
}), i.value?.status === "modified" && s.push({
|
|
1004
|
-
key: "discard",
|
|
1005
|
-
label: n("editor.discard"),
|
|
1006
|
-
icon: "refresh",
|
|
1007
|
-
danger: !0,
|
|
1008
|
-
menu: !0,
|
|
1009
|
-
run: () => {
|
|
1010
|
-
we();
|
|
1011
|
-
}
|
|
1012
|
-
}), s;
|
|
1013
|
-
});
|
|
1014
|
-
return (s, g) => (y(), z("div", {
|
|
1015
|
-
class: "wx-vacancy-editor",
|
|
1016
|
-
onFocusout: oe
|
|
1017
|
-
}, [
|
|
1018
|
-
B.value || !i.value ? (y(), z(ne, { key: 0 }, [
|
|
1019
|
-
p(e(he), {
|
|
1020
|
-
class: "wx-vacancy-editor__ghost",
|
|
1021
|
-
title: "",
|
|
1022
|
-
rows: 1
|
|
1023
|
-
}),
|
|
1024
|
-
p(e(Wt), null, {
|
|
1025
|
-
default: c(() => [
|
|
1026
|
-
p(e(he), { rows: 8 })
|
|
1027
|
-
]),
|
|
1028
|
-
_: 1
|
|
1029
|
-
})
|
|
1030
|
-
], 64)) : (y(), z(ne, { key: 1 }, [
|
|
1031
|
-
p(e(et), {
|
|
1032
|
-
divider: "",
|
|
1033
|
-
back: q.value,
|
|
1034
|
-
"back-label": e(n)("module.vacancies"),
|
|
1035
|
-
title: K.value || e(n)("editor.untitled"),
|
|
1036
|
-
subtitle: se.value,
|
|
1037
|
-
actions: Te.value
|
|
1038
|
-
}, {
|
|
1039
|
-
trail: c(() => [
|
|
1040
|
-
p(e(Ct), {
|
|
1041
|
-
size: "sm",
|
|
1042
|
-
label: e(n)("editor.trail")
|
|
1043
|
-
}, {
|
|
1044
|
-
default: c(() => [
|
|
1045
|
-
p(e(Se), {
|
|
1046
|
-
as: "router-link",
|
|
1047
|
-
to: q.value
|
|
1048
|
-
}, {
|
|
1049
|
-
default: c(() => [
|
|
1050
|
-
V(_(e(n)("module.vacancies")), 1)
|
|
1051
|
-
]),
|
|
1052
|
-
_: 1
|
|
1053
|
-
}, 8, ["to"]),
|
|
1054
|
-
p(e(Se), { current: "" }, {
|
|
1055
|
-
default: c(() => [
|
|
1056
|
-
V(_(K.value || e(n)("editor.untitled")), 1)
|
|
1057
|
-
]),
|
|
1058
|
-
_: 1
|
|
1059
|
-
})
|
|
1060
|
-
]),
|
|
1061
|
-
_: 1
|
|
1062
|
-
}, 8, ["label"])
|
|
1063
|
-
]),
|
|
1064
|
-
"title-after": c(() => [
|
|
1065
|
-
p(e(Y), {
|
|
1066
|
-
type: te(),
|
|
1067
|
-
dot: ""
|
|
1068
|
-
}, {
|
|
1069
|
-
default: c(() => [
|
|
1070
|
-
V(_(e(n)(`panel.status-${i.value.status}`)), 1)
|
|
1071
|
-
]),
|
|
1072
|
-
_: 1
|
|
1073
|
-
}, 8, ["type"]),
|
|
1074
|
-
i.value.status === "modified" ? (y(), $(e(Y), {
|
|
1075
|
-
key: 0,
|
|
1076
|
-
type: "primary",
|
|
1077
|
-
round: ""
|
|
1078
|
-
}, {
|
|
1079
|
-
default: c(() => [
|
|
1080
|
-
V(_(e(n)("panel.edits")), 1)
|
|
1081
|
-
]),
|
|
1082
|
-
_: 1
|
|
1083
|
-
})) : R("", !0),
|
|
1084
|
-
i.value.closed_reason ? (y(), $(e(Y), {
|
|
1085
|
-
key: 1,
|
|
1086
|
-
type: "warning",
|
|
1087
|
-
round: ""
|
|
1088
|
-
}, {
|
|
1089
|
-
default: c(() => [
|
|
1090
|
-
V(_(e(n)(`panel.closed-${i.value.closed_reason}`)), 1)
|
|
1091
|
-
]),
|
|
1092
|
-
_: 1
|
|
1093
|
-
})) : R("", !0)
|
|
1094
|
-
]),
|
|
1095
|
-
_: 1
|
|
1096
|
-
}, 8, ["back", "back-label", "title", "subtitle", "actions"]),
|
|
1097
|
-
p(e(tt), {
|
|
1098
|
-
editing: e(W),
|
|
1099
|
-
onSave: U,
|
|
1100
|
-
onTheirs: be
|
|
1101
|
-
}, null, 8, ["editing"]),
|
|
1102
|
-
p(e(at), {
|
|
1103
|
-
modelValue: x.value,
|
|
1104
|
-
"onUpdate:modelValue": g[0] || (g[0] = (F) => x.value = F),
|
|
1105
|
-
name: "vacancies.form",
|
|
1106
|
-
errors: G.value,
|
|
1107
|
-
disabled: ve.value
|
|
1108
|
-
}, null, 8, ["modelValue", "errors", "disabled"]),
|
|
1109
|
-
L.value ? (y(), $(e(It), { key: 0 }, {
|
|
1110
|
-
state: c(() => [
|
|
1111
|
-
e(W).stopped.value ? R("", !0) : (y(), $(e(lt), {
|
|
1112
|
-
key: 0,
|
|
1113
|
-
state: X.value
|
|
1114
|
-
}, null, 8, ["state"]))
|
|
1115
|
-
]),
|
|
1116
|
-
default: c(() => [
|
|
1117
|
-
p(e(ae), {
|
|
1118
|
-
variant: "text",
|
|
1119
|
-
disabled: S.value,
|
|
1120
|
-
"aria-label": e(n)("panel.duplicate"),
|
|
1121
|
-
onClick: xe
|
|
1122
|
-
}, {
|
|
1123
|
-
icon: c(() => [
|
|
1124
|
-
p(e(re), { name: "copy" })
|
|
1125
|
-
]),
|
|
1126
|
-
default: c(() => [
|
|
1127
|
-
D("span", Xt, _(e(n)("panel.duplicate")), 1)
|
|
1128
|
-
]),
|
|
1129
|
-
_: 1
|
|
1130
|
-
}, 8, ["disabled", "aria-label"]),
|
|
1131
|
-
p(e(ae), {
|
|
1132
|
-
variant: "outline",
|
|
1133
|
-
loading: E.value,
|
|
1134
|
-
disabled: !O.value || e(W).stopped.value,
|
|
1135
|
-
title: e(W).blocked.value,
|
|
1136
|
-
onClick: U
|
|
1137
|
-
}, {
|
|
1138
|
-
default: c(() => [
|
|
1139
|
-
V(_(e(n)("editor.save")), 1)
|
|
1140
|
-
]),
|
|
1141
|
-
_: 1
|
|
1142
|
-
}, 8, ["loading", "disabled", "title"]),
|
|
1143
|
-
p(e(ae), {
|
|
1144
|
-
type: "primary",
|
|
1145
|
-
loading: S.value,
|
|
1146
|
-
disabled: e(W).stopped.value || i.value.status === "published" && !O.value,
|
|
1147
|
-
title: e(W).blocked.value,
|
|
1148
|
-
onClick: _e
|
|
1149
|
-
}, {
|
|
1150
|
-
default: c(() => [
|
|
1151
|
-
V(_(e(n)("panel.publish")), 1)
|
|
1152
|
-
]),
|
|
1153
|
-
_: 1
|
|
1154
|
-
}, 8, ["loading", "disabled", "title"])
|
|
1155
|
-
]),
|
|
1156
|
-
_: 1
|
|
1157
|
-
})) : R("", !0)
|
|
1158
|
-
], 64))
|
|
1159
|
-
], 32));
|
|
1160
|
-
}
|
|
1161
|
-
}), ta = /* @__PURE__ */ We(ea, [["__scopeId", "data-v-d2657864"]]), aa = { class: "wx-vacancy-history-tab" }, la = { class: "wx-vacancy-history" }, na = { class: "wx-vacancy-history__number" }, sa = { class: "wx-vacancy-history__who" }, ia = /* @__PURE__ */ ye({
|
|
1162
|
-
name: "WxVacancyHistory",
|
|
1163
|
-
__name: "VacancyHistory",
|
|
1164
|
-
setup(u) {
|
|
1165
|
-
const d = de(), f = fe(d), v = Qt();
|
|
1166
|
-
me();
|
|
1167
|
-
const l = ce("webx-vacancies"), m = Ve(), a = C(null), N = C(!1), n = h(() => v?.vacancy.value ?? null), k = h(() => v?.canManage ?? !1), I = h(
|
|
1168
|
-
() => n.value?.status === "published" || n.value?.status === "modified" ? a.value?.[0]?.number ?? null : null
|
|
1169
|
-
);
|
|
1170
|
-
async function M() {
|
|
1171
|
-
const i = n.value;
|
|
1172
|
-
if (i)
|
|
1173
|
-
try {
|
|
1174
|
-
a.value = await f.versions(i.id);
|
|
1175
|
-
} catch (x) {
|
|
1176
|
-
a.value = [], w.danger(m(x));
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
async function q(i) {
|
|
1180
|
-
const x = n.value;
|
|
1181
|
-
if (!(!x || !await J({
|
|
1182
|
-
title: l("editor.restore-title", { number: i.number }),
|
|
1183
|
-
message: l("editor.restore-text"),
|
|
1184
|
-
confirmText: l("editor.restore-version"),
|
|
1185
|
-
cancelText: l("panel.cancel")
|
|
1186
|
-
}))) {
|
|
1187
|
-
N.value = !0;
|
|
1188
|
-
try {
|
|
1189
|
-
await f.restoreVersion(x.id, i.number), await v?.reload(), w.success(l("editor.restored-version", { number: i.number }));
|
|
1190
|
-
} catch (T) {
|
|
1191
|
-
w.danger(m(T));
|
|
1192
|
-
} finally {
|
|
1193
|
-
N.value = !1;
|
|
1194
|
-
}
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
return ue(
|
|
1198
|
-
() => [n.value?.id, n.value?.published_at, n.value?.updated_at],
|
|
1199
|
-
() => {
|
|
1200
|
-
M();
|
|
1201
|
-
},
|
|
1202
|
-
{ immediate: !0 }
|
|
1203
|
-
), (i, x) => (y(), z("div", aa, [
|
|
1204
|
-
D("div", la, [
|
|
1205
|
-
a.value === null ? (y(), $(e(he), {
|
|
1206
|
-
key: 0,
|
|
1207
|
-
class: "wx-vacancy-history__ghost",
|
|
1208
|
-
rows: 3
|
|
1209
|
-
})) : a.value.length === 0 ? (y(), $(e(Le), {
|
|
1210
|
-
key: 1,
|
|
1211
|
-
description: e(l)("editor.history-empty")
|
|
1212
|
-
}, null, 8, ["description"])) : (y(!0), z(ne, { key: 2 }, Ae(a.value, (b) => (y(), z("div", {
|
|
1213
|
-
key: b.number,
|
|
1214
|
-
class: De(["wx-vacancy-history__row", { "is-live": b.number === I.value }])
|
|
1215
|
-
}, [
|
|
1216
|
-
D("code", na, _(e(l)("editor.version", { number: b.number })), 1),
|
|
1217
|
-
D("div", sa, [
|
|
1218
|
-
b.created_at ? (y(), $(e(nt), {
|
|
1219
|
-
key: 0,
|
|
1220
|
-
value: b.created_at,
|
|
1221
|
-
size: "md",
|
|
1222
|
-
tone: "default"
|
|
1223
|
-
}, null, 8, ["value"])) : R("", !0),
|
|
1224
|
-
p(e(Nt), {
|
|
1225
|
-
size: "sm",
|
|
1226
|
-
tone: "muted"
|
|
1227
|
-
}, {
|
|
1228
|
-
default: c(() => [
|
|
1229
|
-
V(_(b.author ?? e(l)(`editor.source-${b.source}`)) + " ", 1),
|
|
1230
|
-
b.comment ? (y(), z(ne, { key: 0 }, [
|
|
1231
|
-
V(" · " + _(b.comment), 1)
|
|
1232
|
-
], 64)) : R("", !0)
|
|
1233
|
-
]),
|
|
1234
|
-
_: 2
|
|
1235
|
-
}, 1024)
|
|
1236
|
-
]),
|
|
1237
|
-
b.number === I.value ? (y(), $(e(Y), {
|
|
1238
|
-
key: 0,
|
|
1239
|
-
type: "success",
|
|
1240
|
-
dot: ""
|
|
1241
|
-
}, {
|
|
1242
|
-
default: c(() => [
|
|
1243
|
-
V(_(e(l)("editor.version-live")), 1)
|
|
1244
|
-
]),
|
|
1245
|
-
_: 1
|
|
1246
|
-
})) : R("", !0),
|
|
1247
|
-
k.value && b.number !== I.value ? (y(), $(e(ae), {
|
|
1248
|
-
key: 1,
|
|
1249
|
-
size: "sm",
|
|
1250
|
-
variant: "outline",
|
|
1251
|
-
loading: N.value,
|
|
1252
|
-
onClick: (T) => q(b)
|
|
1253
|
-
}, {
|
|
1254
|
-
default: c(() => [
|
|
1255
|
-
V(_(e(l)("editor.restore-version")), 1)
|
|
1256
|
-
]),
|
|
1257
|
-
_: 1
|
|
1258
|
-
}, 8, ["loading", "onClick"])) : R("", !0)
|
|
1259
|
-
], 2))), 128))
|
|
1260
|
-
]),
|
|
1261
|
-
p(e(st), {
|
|
1262
|
-
id: n.value?.id,
|
|
1263
|
-
entity: "vacancies",
|
|
1264
|
-
screen: "vacancies.form",
|
|
1265
|
-
"can-restore": k.value,
|
|
1266
|
-
stamp: [n.value?.published_at, n.value?.updated_at],
|
|
1267
|
-
onRestored: x[0] || (x[0] = (b) => e(v)?.reload())
|
|
1268
|
-
}, null, 8, ["id", "can-restore", "stamp"])
|
|
1269
|
-
]));
|
|
1270
|
-
}
|
|
1271
|
-
}), oa = /* @__PURE__ */ We(ia, [["__scopeId", "data-v-1db40d1b"]]);
|
|
1272
|
-
function ra(u = "/vacancies") {
|
|
1273
|
-
return {
|
|
1274
|
-
api: "vacancies/categories",
|
|
1275
|
-
path: `${u}/categories`,
|
|
1276
|
-
name: "webx.vacancies.categories",
|
|
1277
|
-
module: "vacancy-categories",
|
|
1278
|
-
screen: "vacancies.category-form",
|
|
1279
|
-
manage: "vacancies.categories.manage",
|
|
1280
|
-
count: "vacancies_count",
|
|
1281
|
-
// Every vacancy of the category, closed ones included: "what is filed here" is the question.
|
|
1282
|
-
items: (d) => ({ path: u, query: { category: String(d), view: "all" } }),
|
|
1283
|
-
words: {
|
|
1284
|
-
new: "webx-vacancies::category.new",
|
|
1285
|
-
empty: "webx-vacancies::category.empty",
|
|
1286
|
-
"empty-help": "webx-vacancies::category.empty-help",
|
|
1287
|
-
order: "webx-vacancies::category.order",
|
|
1288
|
-
hidden: "webx-vacancies::category.hidden",
|
|
1289
|
-
"no-address": "webx-vacancies::category.no-page",
|
|
1290
|
-
count: "webx-vacancies::category.vacancies",
|
|
1291
|
-
"show-items": "webx-vacancies::category.show-vacancies",
|
|
1292
|
-
"delete-blocked": "webx-vacancies::category.delete-blocked",
|
|
1293
|
-
"delete-text": "webx-vacancies::category.delete-text",
|
|
1294
|
-
deleted: "webx-vacancies::category.deleted",
|
|
1295
|
-
saved: "webx-vacancies::category.saved",
|
|
1296
|
-
"field-title": "webx-vacancies::category.field-title",
|
|
1297
|
-
"field-slug": "webx-vacancies::category.field-slug"
|
|
1298
|
-
}
|
|
1299
|
-
};
|
|
1300
|
-
}
|
|
1301
|
-
function pa(u = {}) {
|
|
1302
|
-
const d = u.path ?? "/vacancies";
|
|
1303
|
-
return [
|
|
1304
|
-
{
|
|
1305
|
-
id: "vacancies",
|
|
1306
|
-
path: d,
|
|
1307
|
-
routes: [
|
|
1308
|
-
{ path: d, name: "webx.vacancies", component: Jt, props: { base: d } },
|
|
1309
|
-
{
|
|
1310
|
-
path: `${d}/:id(\\d+)`,
|
|
1311
|
-
name: "webx.vacancies.edit",
|
|
1312
|
-
component: ta,
|
|
1313
|
-
props: { base: d }
|
|
1314
|
-
}
|
|
1315
|
-
],
|
|
1316
|
-
/*
|
|
1317
|
-
* The one part of `vacancies.form` only this module can draw. Everything else on it is the
|
|
1318
|
-
* panel's (`wx-slug`, `wx-categories`, `wx-relations`, `wx-rich-text`, `wx-repeater`,
|
|
1319
|
-
* `wx-date-picker`, `wx-checkbox-group`).
|
|
1320
|
-
*/
|
|
1321
|
-
types: {
|
|
1322
|
-
"wx-vacancy-history": { component: oa, kind: "display" }
|
|
1323
|
-
}
|
|
1324
|
-
},
|
|
1325
|
-
{
|
|
1326
|
-
id: "vacancy-categories",
|
|
1327
|
-
path: `${d}/categories`,
|
|
1328
|
-
routes: it(ra(d))
|
|
1329
|
-
}
|
|
1330
|
-
];
|
|
1331
|
-
}
|
|
1
|
+
import "vue";
|
|
2
|
+
import { V as e, W as i, _ as n, b as o, d as r, c as t, p as y, f as V, v as d, g, h as p, i as v } from "./index-V7QvGgXw.js";
|
|
1332
3
|
export {
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
4
|
+
e as VACANCIES_API,
|
|
5
|
+
i as WxVacanciesPage,
|
|
6
|
+
n as WxVacancyCreateDialog,
|
|
7
|
+
o as WxVacancyEditorPage,
|
|
8
|
+
r as WxVacancyHistory,
|
|
9
|
+
t as createVacanciesApi,
|
|
10
|
+
y as provideVacancyEditor,
|
|
11
|
+
V as useVacancyEditor,
|
|
12
|
+
d as vacancies,
|
|
13
|
+
g as vacanciesMessages,
|
|
14
|
+
p as vacancyCategoriesOptions,
|
|
15
|
+
v as vacancyEditorKey
|
|
1345
16
|
};
|
|
1346
17
|
//# sourceMappingURL=index.js.map
|