@naisys/erp 3.0.0-beta.49 → 3.0.0-beta.51

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.
@@ -45,9 +45,9 @@
45
45
  <meta name="format-detection" content="telephone=no" />
46
46
 
47
47
  <title>NAISYS ERP</title>
48
- <script type="module" crossorigin src="/erp/assets/index-Bu_bS_Vd.js"></script>
48
+ <script type="module" crossorigin src="/erp/assets/index-CO2ivEdE.js"></script>
49
49
  <link rel="modulepreload" crossorigin href="/erp/assets/rolldown-runtime-CvHMtSRF.js">
50
- <link rel="modulepreload" crossorigin href="/erp/assets/vendor-Co7ZCNxO.js">
50
+ <link rel="modulepreload" crossorigin href="/erp/assets/vendor-CJ0ET9hP.js">
51
51
  <link rel="stylesheet" crossorigin href="/erp/assets/vendor-CLUPjUnv.css">
52
52
  <link rel="stylesheet" crossorigin href="/erp/assets/index-CSiMTJfw.css">
53
53
  </head>
@@ -6,5 +6,5 @@ export function erpDbUrl() {
6
6
  return "file:" + erpDbPath();
7
7
  }
8
8
  /** We run migration scripts if this is greater than what's in the schema_version table */
9
- export const ERP_DB_VERSION = 44;
9
+ export const ERP_DB_VERSION = 45;
10
10
  //# sourceMappingURL=dbConfig.js.map
package/dist/erpServer.js CHANGED
@@ -24,6 +24,7 @@ import { initErpDb } from "./database/erpDb.js";
24
24
  import { erpRoutes } from "./erpRoutes.js";
25
25
  import { registerAuthMiddleware } from "./middleware/auth-middleware.js";
26
26
  import { isSupervisorAuth } from "./middleware/supervisorAuth.js";
27
+ import { backfillOpRunTokens } from "./services/production/labor-ticket-backfill.js";
27
28
  import { ensureLocalSuperAdmin, ensureSupervisorSuperAdmin, } from "./services/user-service.js";
28
29
  export { enableSupervisorAuth } from "./middleware/supervisorAuth.js";
29
30
  const __filename = fileURLToPath(import.meta.url);
@@ -65,6 +66,7 @@ export const erpPlugin = async (fastify, opts) => {
65
66
  throw new Error("[ERP] Supervisor database not available. Required for supervisor auth.");
66
67
  }
67
68
  await ensureSupervisorSuperAdmin();
69
+ await backfillOpRunTokens();
68
70
  }
69
71
  else {
70
72
  await ensureLocalSuperAdmin(opts.superAdminPassword);