@careflair/common 1.0.33 → 1.0.35

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.
@@ -363,7 +363,8 @@ export declare enum JOB_TABS {
363
363
  ALL = "all",
364
364
  MY_JOBS = "my-jobs",
365
365
  APPLIED_JOBS = "applied-jobs",
366
- MATCHED_JOBS = "matched-jobs"
366
+ MATCHED_JOBS = "matched-jobs",
367
+ OTHER_JOBS = "other-jobs"
367
368
  }
368
369
  export declare enum DocumentType {
369
370
  NDIS_WORKER_SCREENING = "NDIS_WORKER_SCREENING",
@@ -420,6 +420,7 @@ var JOB_TABS;
420
420
  JOB_TABS["MY_JOBS"] = "my-jobs";
421
421
  JOB_TABS["APPLIED_JOBS"] = "applied-jobs";
422
422
  JOB_TABS["MATCHED_JOBS"] = "matched-jobs";
423
+ JOB_TABS["OTHER_JOBS"] = "other-jobs";
423
424
  })(JOB_TABS || (exports.JOB_TABS = JOB_TABS = {}));
424
425
  var DocumentType;
425
426
  (function (DocumentType) {
@@ -27,9 +27,13 @@ export declare const formatJobPostDate: (createdAt: string | Date) => string;
27
27
  export declare const formatJobPostDateAbsolute: (createdAt: string | Date) => string;
28
28
  /**
29
29
  * Format a date/time to display in a user-friendly format
30
+ * For schedule times (job shifts), always displays in UTC to show exact time as entered by job creator
31
+ * This ensures "9 AM" shows as "9 AM" for all users regardless of their timezone (important for P2P physical jobs)
30
32
  */
31
33
  export declare const formatDateTime: (dateTime: string | Date) => string;
32
34
  /**
33
35
  * Format a date to display in a user-friendly format
36
+ * For schedule dates, always displays in UTC to show exact date as entered by job creator
37
+ * This ensures "Jan 15" shows as "Jan 15" for all users regardless of their timezone (important for P2P physical jobs)
34
38
  */
35
39
  export declare const formatDate: (dateTime: string | Date) => string;
@@ -144,23 +144,29 @@ const formatJobPostDateAbsolute = (createdAt) => {
144
144
  exports.formatJobPostDateAbsolute = formatJobPostDateAbsolute;
145
145
  /**
146
146
  * Format a date/time to display in a user-friendly format
147
+ * For schedule times (job shifts), always displays in UTC to show exact time as entered by job creator
148
+ * This ensures "9 AM" shows as "9 AM" for all users regardless of their timezone (important for P2P physical jobs)
147
149
  */
148
150
  const formatDateTime = (dateTime) => {
149
151
  return new Date(dateTime).toLocaleTimeString("en-US", {
150
152
  hour: "numeric",
151
153
  minute: "2-digit",
152
154
  hour12: true,
155
+ timeZone: "UTC", // Always show UTC time to preserve job creator's intended time
153
156
  });
154
157
  };
155
158
  exports.formatDateTime = formatDateTime;
156
159
  /**
157
160
  * Format a date to display in a user-friendly format
161
+ * For schedule dates, always displays in UTC to show exact date as entered by job creator
162
+ * This ensures "Jan 15" shows as "Jan 15" for all users regardless of their timezone (important for P2P physical jobs)
158
163
  */
159
164
  const formatDate = (dateTime) => {
160
165
  return new Date(dateTime).toLocaleDateString("en-US", {
161
166
  weekday: "long",
162
167
  month: "short",
163
168
  day: "numeric",
169
+ timeZone: "UTC", // Always show UTC date to preserve job creator's intended date
164
170
  });
165
171
  };
166
172
  exports.formatDate = formatDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@careflair/common",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "description": "Shared assets for CareFlair",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",