@goweekdays/layer-common 1.5.1 → 1.5.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @goweekdays/layer-common
2
2
 
3
+ ## 1.5.2
4
+
5
+ ### Patch Changes
6
+
7
+ - c94cd5f: Add job post filters and supporting API methods
8
+
3
9
  ## 1.5.1
4
10
 
5
11
  ### Patch Changes
@@ -23,7 +23,7 @@ export function useJobPost() {
23
23
  id: any,
24
24
  { page = 1, search = "", status = "draft", limit = 10, org = "" } = {}
25
25
  ) {
26
- return useNuxtApp().$api<Record<string, any>>(`/api/job/posts/${id}`, {
26
+ return useNuxtApp().$api<Record<string, any>>(`/api/job/posts/org/${id}`, {
27
27
  method: "GET",
28
28
  query: {
29
29
  page,
@@ -56,9 +56,169 @@ export function useJobPost() {
56
56
  );
57
57
  }
58
58
 
59
+ function getLocations({ page = 1, limit = 10, search = "" } = {}) {
60
+ return useNuxtApp().$api<Record<string, any>>(`/api/job/posts/locations`, {
61
+ method: "GET",
62
+ query: {
63
+ page,
64
+ limit,
65
+ search,
66
+ },
67
+ });
68
+ }
69
+
70
+ function getJobTitles({ page = 1, limit = 10, search = "" } = {}) {
71
+ return useNuxtApp().$api<Record<string, any>>(`/api/job/posts/titles`, {
72
+ method: "GET",
73
+ query: {
74
+ page,
75
+ limit,
76
+ search,
77
+ },
78
+ });
79
+ }
80
+
81
+ function getCurrencies({ page = 1, limit = 10, search = "" } = {}) {
82
+ return useNuxtApp().$api<Record<string, any>>(`/api/job/posts/currencies`, {
83
+ method: "GET",
84
+ query: {
85
+ page,
86
+ limit,
87
+ search,
88
+ },
89
+ });
90
+ }
91
+
92
+ const workplaceTypes = [
93
+ { title: "On-site", value: "onsite" },
94
+ { title: "Remote", value: "remote" },
95
+ ];
96
+
97
+ const jobTypes = [
98
+ { title: "Full-time", value: "full-time" },
99
+ { title: "Part-time", value: "part-time" },
100
+ { title: "Internship - Education/OJT", value: "internship-education" },
101
+ { title: "Internship - Career", value: "internship-career" },
102
+ ];
103
+
104
+ const defaultCurrencies = [
105
+ {
106
+ title: "PHP",
107
+ value: "PHP",
108
+ prop: {
109
+ subtitle: "Philippines Peso",
110
+ },
111
+ },
112
+ {
113
+ title: "USD",
114
+ value: "USD",
115
+ prop: {
116
+ subtitle: "United States Dollar",
117
+ },
118
+ },
119
+ {
120
+ title: "EUR",
121
+ value: "EUR",
122
+ prop: {
123
+ subtitle: "Euro",
124
+ },
125
+ },
126
+ {
127
+ title: "GBP",
128
+ value: "GBP",
129
+ prop: {
130
+ subtitle: "British Pound Sterling",
131
+ },
132
+ },
133
+ {
134
+ title: "JPY",
135
+ value: "JPY",
136
+ prop: {
137
+ subtitle: "Japanese Yen",
138
+ },
139
+ },
140
+ {
141
+ title: "AUD",
142
+ value: "AUD",
143
+ prop: {
144
+ subtitle: "Australian Dollar",
145
+ },
146
+ },
147
+ {
148
+ title: "CAD",
149
+ value: "CAD",
150
+ prop: {
151
+ subtitle: "Canadian Dollar",
152
+ },
153
+ },
154
+ {
155
+ title: "CHF",
156
+ value: "CHF",
157
+ prop: {
158
+ subtitle: "Swiss Franc",
159
+ },
160
+ },
161
+ {
162
+ title: "CNY",
163
+ value: "CNY",
164
+ prop: {
165
+ subtitle: "Chinese Yuan",
166
+ },
167
+ },
168
+ {
169
+ title: "INR",
170
+ value: "INR",
171
+ prop: {
172
+ subtitle: "Indian Rupee",
173
+ },
174
+ },
175
+ ];
176
+
177
+ const payPeriodOptions = [
178
+ { title: "Hourly", value: "hourly" },
179
+ { title: "Weekly", value: "weekly" },
180
+ { title: "Bi-Monthly", value: "bi-monthly" },
181
+ { title: "Monthly", value: "monthly" },
182
+ { title: "Annually", value: "annually" },
183
+ ];
184
+
185
+ const searchFilterJobTitle = useState<string>(
186
+ "searchFilterJobTitle",
187
+ () => ""
188
+ );
189
+
190
+ const searchFilterWorkType = useState<string>(
191
+ "searchFilterWorkType",
192
+ () => ""
193
+ );
194
+
195
+ const searchFilterJobType = useState<string>("searchFilterJobType", () => "");
196
+
197
+ const searchFilterLocation = useState<string>(
198
+ "searchFilterLocation",
199
+ () => ""
200
+ );
201
+
202
+ const searchFilterCurrency = useState<string>(
203
+ "searchFilterCurrency",
204
+ () => ""
205
+ );
206
+
59
207
  return {
60
208
  jobPost,
209
+ workplaceTypes,
210
+ jobTypes,
211
+ defaultCurrencies,
212
+ payPeriodOptions,
213
+ searchFilterJobTitle,
214
+ searchFilterWorkType,
215
+ searchFilterJobType,
216
+ searchFilterLocation,
217
+ searchFilterCurrency,
61
218
  getAll,
219
+ getLocations,
220
+ getJobTitles,
221
+ getCurrencies,
62
222
  getJobPostsByOrg,
63
223
  getJobPostsById,
64
224
  deleteJobPostById,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@goweekdays/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.5.1",
5
+ "version": "1.5.2",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"