@timardex/cluemart-shared 1.7.84 → 1.7.86
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/{chunk-BL7UBY4I.mjs → chunk-HPHI5IVL.mjs} +17 -3
- package/dist/chunk-HPHI5IVL.mjs.map +1 -0
- package/dist/{chunk-5RXL62LO.mjs → chunk-RCARDOVS.mjs} +4 -6
- package/dist/chunk-RCARDOVS.mjs.map +1 -0
- package/dist/formFields/index.cjs.map +1 -1
- package/dist/formFields/index.mjs +1 -1
- package/dist/graphql/index.cjs +16 -2
- package/dist/graphql/index.cjs.map +1 -1
- package/dist/graphql/index.mjs +1 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.cjs +19 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +19 -7
- package/dist/index.mjs.map +1 -1
- package/dist/utils/index.cjs +3 -5
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-5RXL62LO.mjs.map +0 -1
- package/dist/chunk-BL7UBY4I.mjs.map +0 -1
package/dist/graphql/index.cjs
CHANGED
|
@@ -2932,7 +2932,14 @@ var useCreateVendor = () => {
|
|
|
2932
2932
|
var useUpdateVendor = () => {
|
|
2933
2933
|
const [updateVendor, { loading, error }] = (0, import_client39.useMutation)(UPDATE_VENDOR_MUTATION, {
|
|
2934
2934
|
awaitRefetchQueries: true,
|
|
2935
|
-
refetchQueries:
|
|
2935
|
+
refetchQueries: (mutationResult) => {
|
|
2936
|
+
const vendorId = mutationResult?.data?.updateVendor?.data?._id;
|
|
2937
|
+
if (!vendorId) return [];
|
|
2938
|
+
return [
|
|
2939
|
+
{ query: GET_USER_VENDORS },
|
|
2940
|
+
{ query: GET_VENDOR, variables: { _id: vendorId } }
|
|
2941
|
+
];
|
|
2942
|
+
}
|
|
2936
2943
|
});
|
|
2937
2944
|
return { error, loading, updateVendor };
|
|
2938
2945
|
};
|
|
@@ -3941,7 +3948,14 @@ var useCreatePartner = () => {
|
|
|
3941
3948
|
var useUpdatePartner = () => {
|
|
3942
3949
|
const [updatePartner, { loading, error }] = (0, import_client57.useMutation)(UPDATE_PARTNER_MUTATION, {
|
|
3943
3950
|
awaitRefetchQueries: true,
|
|
3944
|
-
refetchQueries:
|
|
3951
|
+
refetchQueries: (mutationResult) => {
|
|
3952
|
+
const partnerId = mutationResult?.data?.updatePartner?.data?._id;
|
|
3953
|
+
if (!partnerId) return [];
|
|
3954
|
+
return [
|
|
3955
|
+
{ query: GET_USER_PARTNERS },
|
|
3956
|
+
{ query: GET_PARTNER, variables: { _id: partnerId } }
|
|
3957
|
+
];
|
|
3958
|
+
}
|
|
3945
3959
|
});
|
|
3946
3960
|
return { error, loading, updatePartner };
|
|
3947
3961
|
};
|