@fctc/widget-logic 3.10.7 → 3.10.9
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.d.mts +1 -4
- package/dist/hooks.d.ts +1 -4
- package/dist/hooks.js +4 -7
- package/dist/hooks.mjs +4 -7
- package/dist/index.js +4 -7
- package/dist/index.mjs +4 -7
- package/package.json +2 -2
package/dist/hooks.d.mts
CHANGED
|
@@ -534,9 +534,6 @@ declare const useCompany: ({ service }: {
|
|
|
534
534
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
535
535
|
promise: Promise<any>;
|
|
536
536
|
};
|
|
537
|
-
context: {
|
|
538
|
-
allowed_company_ids: (number | undefined)[];
|
|
539
|
-
};
|
|
540
537
|
} | undefined;
|
|
541
538
|
interface CompanyTuple extends Array<number | string> {
|
|
542
539
|
0: number;
|
|
@@ -1163,7 +1160,7 @@ interface PartnerID {
|
|
|
1163
1160
|
type ContextProfile = {
|
|
1164
1161
|
uid: number;
|
|
1165
1162
|
lang: string;
|
|
1166
|
-
allowed_company_ids
|
|
1163
|
+
allowed_company_ids?: number[];
|
|
1167
1164
|
[key: string]: any;
|
|
1168
1165
|
};
|
|
1169
1166
|
|
package/dist/hooks.d.ts
CHANGED
|
@@ -534,9 +534,6 @@ declare const useCompany: ({ service }: {
|
|
|
534
534
|
fetchStatus: _tanstack_query_core.FetchStatus;
|
|
535
535
|
promise: Promise<any>;
|
|
536
536
|
};
|
|
537
|
-
context: {
|
|
538
|
-
allowed_company_ids: (number | undefined)[];
|
|
539
|
-
};
|
|
540
537
|
} | undefined;
|
|
541
538
|
interface CompanyTuple extends Array<number | string> {
|
|
542
539
|
0: number;
|
|
@@ -1163,7 +1160,7 @@ interface PartnerID {
|
|
|
1163
1160
|
type ContextProfile = {
|
|
1164
1161
|
uid: number;
|
|
1165
1162
|
lang: string;
|
|
1166
|
-
allowed_company_ids
|
|
1163
|
+
allowed_company_ids?: number[];
|
|
1167
1164
|
[key: string]: any;
|
|
1168
1165
|
};
|
|
1169
1166
|
|
package/dist/hooks.js
CHANGED
|
@@ -483,7 +483,6 @@ var useProfile = ({ service }) => {
|
|
|
483
483
|
if (userInfoQuery.data?.sub && userInfoQuery.data?.locale) {
|
|
484
484
|
return {
|
|
485
485
|
uid: Number(userInfoQuery.data.sub),
|
|
486
|
-
allowed_company_ids: [],
|
|
487
486
|
lang: String(userInfoQuery.data.locale),
|
|
488
487
|
tz: "Asia/Saigon"
|
|
489
488
|
};
|
|
@@ -591,8 +590,7 @@ var useCompany = ({ service }) => {
|
|
|
591
590
|
if (!companyInfo?.data || !currentCompany?.data) return;
|
|
592
591
|
return {
|
|
593
592
|
currentCompany: { ...currentCompany },
|
|
594
|
-
companyInfo: { ...companyInfo }
|
|
595
|
-
context: { allowed_company_ids: [current_company_id] }
|
|
593
|
+
companyInfo: { ...companyInfo }
|
|
596
594
|
};
|
|
597
595
|
};
|
|
598
596
|
|
|
@@ -618,12 +616,11 @@ var AppProvider = ({
|
|
|
618
616
|
return combineContexts([
|
|
619
617
|
{
|
|
620
618
|
...user?.context,
|
|
621
|
-
...!(0, utils_exports.isObjectEmpty)(env?.user)
|
|
619
|
+
...!(0, utils_exports.isObjectEmpty)(env?.user) ? { lang: env?.context?.lang } : {},
|
|
622
620
|
...menuParams?.context ?? {}
|
|
623
|
-
}
|
|
624
|
-
company?.context
|
|
621
|
+
}
|
|
625
622
|
]);
|
|
626
|
-
}, [user?.context
|
|
623
|
+
}, [user?.context]);
|
|
627
624
|
const menu = useMenu({
|
|
628
625
|
context: {
|
|
629
626
|
...menuContext
|
package/dist/hooks.mjs
CHANGED
|
@@ -464,7 +464,6 @@ var useProfile = ({ service }) => {
|
|
|
464
464
|
if (userInfoQuery.data?.sub && userInfoQuery.data?.locale) {
|
|
465
465
|
return {
|
|
466
466
|
uid: Number(userInfoQuery.data.sub),
|
|
467
|
-
allowed_company_ids: [],
|
|
468
467
|
lang: String(userInfoQuery.data.locale),
|
|
469
468
|
tz: "Asia/Saigon"
|
|
470
469
|
};
|
|
@@ -572,8 +571,7 @@ var useCompany = ({ service }) => {
|
|
|
572
571
|
if (!companyInfo?.data || !currentCompany?.data) return;
|
|
573
572
|
return {
|
|
574
573
|
currentCompany: { ...currentCompany },
|
|
575
|
-
companyInfo: { ...companyInfo }
|
|
576
|
-
context: { allowed_company_ids: [current_company_id] }
|
|
574
|
+
companyInfo: { ...companyInfo }
|
|
577
575
|
};
|
|
578
576
|
};
|
|
579
577
|
|
|
@@ -599,12 +597,11 @@ var AppProvider = ({
|
|
|
599
597
|
return combineContexts([
|
|
600
598
|
{
|
|
601
599
|
...user?.context,
|
|
602
|
-
...!(0, utils_exports.isObjectEmpty)(env?.user)
|
|
600
|
+
...!(0, utils_exports.isObjectEmpty)(env?.user) ? { lang: env?.context?.lang } : {},
|
|
603
601
|
...menuParams?.context ?? {}
|
|
604
|
-
}
|
|
605
|
-
company?.context
|
|
602
|
+
}
|
|
606
603
|
]);
|
|
607
|
-
}, [user?.context
|
|
604
|
+
}, [user?.context]);
|
|
608
605
|
const menu = useMenu({
|
|
609
606
|
context: {
|
|
610
607
|
...menuContext
|
package/dist/index.js
CHANGED
|
@@ -4533,7 +4533,6 @@ var useProfile = ({ service }) => {
|
|
|
4533
4533
|
if (userInfoQuery.data?.sub && userInfoQuery.data?.locale) {
|
|
4534
4534
|
return {
|
|
4535
4535
|
uid: Number(userInfoQuery.data.sub),
|
|
4536
|
-
allowed_company_ids: [],
|
|
4537
4536
|
lang: String(userInfoQuery.data.locale),
|
|
4538
4537
|
tz: "Asia/Saigon"
|
|
4539
4538
|
};
|
|
@@ -4641,8 +4640,7 @@ var useCompany = ({ service }) => {
|
|
|
4641
4640
|
if (!companyInfo?.data || !currentCompany?.data) return;
|
|
4642
4641
|
return {
|
|
4643
4642
|
currentCompany: { ...currentCompany },
|
|
4644
|
-
companyInfo: { ...companyInfo }
|
|
4645
|
-
context: { allowed_company_ids: [current_company_id] }
|
|
4643
|
+
companyInfo: { ...companyInfo }
|
|
4646
4644
|
};
|
|
4647
4645
|
};
|
|
4648
4646
|
|
|
@@ -4668,12 +4666,11 @@ var AppProvider = ({
|
|
|
4668
4666
|
return combineContexts([
|
|
4669
4667
|
{
|
|
4670
4668
|
...user?.context,
|
|
4671
|
-
...!(0, utils_exports.isObjectEmpty)(env?.user)
|
|
4669
|
+
...!(0, utils_exports.isObjectEmpty)(env?.user) ? { lang: env?.context?.lang } : {},
|
|
4672
4670
|
...menuParams?.context ?? {}
|
|
4673
|
-
}
|
|
4674
|
-
company?.context
|
|
4671
|
+
}
|
|
4675
4672
|
]);
|
|
4676
|
-
}, [user?.context
|
|
4673
|
+
}, [user?.context]);
|
|
4677
4674
|
const menu = useMenu({
|
|
4678
4675
|
context: {
|
|
4679
4676
|
...menuContext
|
package/dist/index.mjs
CHANGED
|
@@ -4608,7 +4608,6 @@ var useProfile = ({ service }) => {
|
|
|
4608
4608
|
if (userInfoQuery.data?.sub && userInfoQuery.data?.locale) {
|
|
4609
4609
|
return {
|
|
4610
4610
|
uid: Number(userInfoQuery.data.sub),
|
|
4611
|
-
allowed_company_ids: [],
|
|
4612
4611
|
lang: String(userInfoQuery.data.locale),
|
|
4613
4612
|
tz: "Asia/Saigon"
|
|
4614
4613
|
};
|
|
@@ -4716,8 +4715,7 @@ var useCompany = ({ service }) => {
|
|
|
4716
4715
|
if (!companyInfo?.data || !currentCompany?.data) return;
|
|
4717
4716
|
return {
|
|
4718
4717
|
currentCompany: { ...currentCompany },
|
|
4719
|
-
companyInfo: { ...companyInfo }
|
|
4720
|
-
context: { allowed_company_ids: [current_company_id] }
|
|
4718
|
+
companyInfo: { ...companyInfo }
|
|
4721
4719
|
};
|
|
4722
4720
|
};
|
|
4723
4721
|
|
|
@@ -4743,12 +4741,11 @@ var AppProvider = ({
|
|
|
4743
4741
|
return combineContexts([
|
|
4744
4742
|
{
|
|
4745
4743
|
...user?.context,
|
|
4746
|
-
...!(0, utils_exports.isObjectEmpty)(env?.user)
|
|
4744
|
+
...!(0, utils_exports.isObjectEmpty)(env?.user) ? { lang: env?.context?.lang } : {},
|
|
4747
4745
|
...menuParams?.context ?? {}
|
|
4748
|
-
}
|
|
4749
|
-
company?.context
|
|
4746
|
+
}
|
|
4750
4747
|
]);
|
|
4751
|
-
}, [user?.context
|
|
4748
|
+
}, [user?.context]);
|
|
4752
4749
|
const menu = useMenu({
|
|
4753
4750
|
context: {
|
|
4754
4751
|
...menuContext
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fctc/widget-logic",
|
|
3
|
-
"version": "3.10.
|
|
3
|
+
"version": "3.10.9",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"test": "jest"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@fctc/interface-logic": "^3.5.
|
|
77
|
+
"@fctc/interface-logic": "^3.5.2",
|
|
78
78
|
"@headlessui/react": "^2.2.6",
|
|
79
79
|
"@tanstack/react-query": "^5.84.0",
|
|
80
80
|
"i18next": "^25.3.2",
|