@fctc/interface-logic 3.3.6 → 3.3.7

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/hooks.js CHANGED
@@ -4439,17 +4439,23 @@ function useUserService() {
4439
4439
  [env]
4440
4440
  );
4441
4441
  const switchUserLocale = (0, import_react13.useCallback)(
4442
- async ({ id, values }) => {
4442
+ async ({ id, values, service, xNode }) => {
4443
4443
  const jsonData = {
4444
4444
  model: "res.users",
4445
4445
  domain: [["id", "=", id]],
4446
4446
  values
4447
4447
  };
4448
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4449
- headers: {
4450
- "Content-Type": "application/json"
4451
- }
4452
- });
4448
+ return env?.requests.post(
4449
+ UriConstants?.CREATE_UPDATE_PATH,
4450
+ jsonData,
4451
+ {
4452
+ headers: {
4453
+ "Content-Type": "application/json",
4454
+ ...xNode ? { "X-Node": xNode } : {}
4455
+ }
4456
+ },
4457
+ service
4458
+ );
4453
4459
  },
4454
4460
  [env]
4455
4461
  );
package/dist/hooks.mjs CHANGED
@@ -4306,17 +4306,23 @@ function useUserService() {
4306
4306
  [env]
4307
4307
  );
4308
4308
  const switchUserLocale = useCallback9(
4309
- async ({ id, values }) => {
4309
+ async ({ id, values, service, xNode }) => {
4310
4310
  const jsonData = {
4311
4311
  model: "res.users",
4312
4312
  domain: [["id", "=", id]],
4313
4313
  values
4314
4314
  };
4315
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4316
- headers: {
4317
- "Content-Type": "application/json"
4318
- }
4319
- });
4315
+ return env?.requests.post(
4316
+ UriConstants?.CREATE_UPDATE_PATH,
4317
+ jsonData,
4318
+ {
4319
+ headers: {
4320
+ "Content-Type": "application/json",
4321
+ ...xNode ? { "X-Node": xNode } : {}
4322
+ }
4323
+ },
4324
+ service
4325
+ );
4320
4326
  },
4321
4327
  [env]
4322
4328
  );
package/dist/provider.js CHANGED
@@ -4435,17 +4435,23 @@ function useUserService() {
4435
4435
  [env]
4436
4436
  );
4437
4437
  const switchUserLocale = (0, import_react9.useCallback)(
4438
- async ({ id, values }) => {
4438
+ async ({ id, values, service, xNode }) => {
4439
4439
  const jsonData = {
4440
4440
  model: "res.users",
4441
4441
  domain: [["id", "=", id]],
4442
4442
  values
4443
4443
  };
4444
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4445
- headers: {
4446
- "Content-Type": "application/json"
4447
- }
4448
- });
4444
+ return env?.requests.post(
4445
+ UriConstants?.CREATE_UPDATE_PATH,
4446
+ jsonData,
4447
+ {
4448
+ headers: {
4449
+ "Content-Type": "application/json",
4450
+ ...xNode ? { "X-Node": xNode } : {}
4451
+ }
4452
+ },
4453
+ service
4454
+ );
4449
4455
  },
4450
4456
  [env]
4451
4457
  );
package/dist/provider.mjs CHANGED
@@ -4392,17 +4392,23 @@ function useUserService() {
4392
4392
  [env]
4393
4393
  );
4394
4394
  const switchUserLocale = useCallback8(
4395
- async ({ id, values }) => {
4395
+ async ({ id, values, service, xNode }) => {
4396
4396
  const jsonData = {
4397
4397
  model: "res.users",
4398
4398
  domain: [["id", "=", id]],
4399
4399
  values
4400
4400
  };
4401
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4402
- headers: {
4403
- "Content-Type": "application/json"
4404
- }
4405
- });
4401
+ return env?.requests.post(
4402
+ UriConstants?.CREATE_UPDATE_PATH,
4403
+ jsonData,
4404
+ {
4405
+ headers: {
4406
+ "Content-Type": "application/json",
4407
+ ...xNode ? { "X-Node": xNode } : {}
4408
+ }
4409
+ },
4410
+ service
4411
+ );
4406
4412
  },
4407
4413
  [env]
4408
4414
  );
@@ -248,7 +248,7 @@ declare function useUserService(): {
248
248
  context: any;
249
249
  id: any;
250
250
  }) => Promise<any>;
251
- switchUserLocale: ({ id, values }: any) => Promise<any>;
251
+ switchUserLocale: ({ id, values, service, xNode }: any) => Promise<any>;
252
252
  };
253
253
 
254
254
  declare function useViewService(): {
@@ -248,7 +248,7 @@ declare function useUserService(): {
248
248
  context: any;
249
249
  id: any;
250
250
  }) => Promise<any>;
251
- switchUserLocale: ({ id, values }: any) => Promise<any>;
251
+ switchUserLocale: ({ id, values, service, xNode }: any) => Promise<any>;
252
252
  };
253
253
 
254
254
  declare function useViewService(): {
package/dist/services.js CHANGED
@@ -4615,17 +4615,23 @@ function useUserService() {
4615
4615
  [env]
4616
4616
  );
4617
4617
  const switchUserLocale = (0, import_react13.useCallback)(
4618
- async ({ id, values }) => {
4618
+ async ({ id, values, service, xNode }) => {
4619
4619
  const jsonData = {
4620
4620
  model: "res.users",
4621
4621
  domain: [["id", "=", id]],
4622
4622
  values
4623
4623
  };
4624
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4625
- headers: {
4626
- "Content-Type": "application/json"
4627
- }
4628
- });
4624
+ return env?.requests.post(
4625
+ UriConstants?.CREATE_UPDATE_PATH,
4626
+ jsonData,
4627
+ {
4628
+ headers: {
4629
+ "Content-Type": "application/json",
4630
+ ...xNode ? { "X-Node": xNode } : {}
4631
+ }
4632
+ },
4633
+ service
4634
+ );
4629
4635
  },
4630
4636
  [env]
4631
4637
  );
package/dist/services.mjs CHANGED
@@ -4571,17 +4571,23 @@ function useUserService() {
4571
4571
  [env]
4572
4572
  );
4573
4573
  const switchUserLocale = useCallback9(
4574
- async ({ id, values }) => {
4574
+ async ({ id, values, service, xNode }) => {
4575
4575
  const jsonData = {
4576
4576
  model: "res.users",
4577
4577
  domain: [["id", "=", id]],
4578
4578
  values
4579
4579
  };
4580
- return env?.requests.post(UriConstants?.CREATE_UPDATE_PATH, jsonData, {
4581
- headers: {
4582
- "Content-Type": "application/json"
4583
- }
4584
- });
4580
+ return env?.requests.post(
4581
+ UriConstants?.CREATE_UPDATE_PATH,
4582
+ jsonData,
4583
+ {
4584
+ headers: {
4585
+ "Content-Type": "application/json",
4586
+ ...xNode ? { "X-Node": xNode } : {}
4587
+ }
4588
+ },
4589
+ service
4590
+ );
4585
4591
  },
4586
4592
  [env]
4587
4593
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "3.3.6",
3
+ "version": "3.3.7",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",