@bigbinary/neeto-team-members-frontend 4.2.0 → 4.2.1
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/index.cjs.js +126 -167
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +127 -168
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.cjs.js
CHANGED
|
@@ -44,6 +44,7 @@ var Search$1 = require('@bigbinary/neeto-icons/Search');
|
|
|
44
44
|
var Close = require('@bigbinary/neeto-icons/Close');
|
|
45
45
|
var Input$1 = require('@bigbinary/neetoui/Input');
|
|
46
46
|
var neetoImageUploaderFrontend = require('@bigbinary/neeto-image-uploader-frontend');
|
|
47
|
+
var neetoTimeZones = require('@bigbinary/neeto-time-zones');
|
|
47
48
|
var ExternalLink = require('@bigbinary/neeto-icons/ExternalLink');
|
|
48
49
|
var Callout = require('@bigbinary/neetoui/Callout');
|
|
49
50
|
var Label = require('@bigbinary/neetoui/Label');
|
|
@@ -1820,6 +1821,7 @@ AssignList.MembersListItem = MembersListItem;
|
|
|
1820
1821
|
AssignList.TeamsListItem = TeamsListItem;
|
|
1821
1822
|
|
|
1822
1823
|
var MembersDropdown = function MembersDropdown(_ref) {
|
|
1824
|
+
var _config$closeOnSelect, _jsx2;
|
|
1823
1825
|
var config = _ref.config;
|
|
1824
1826
|
var _useState = require$$0.useState(false),
|
|
1825
1827
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -1850,73 +1852,65 @@ var MembersDropdown = function MembersDropdown(_ref) {
|
|
|
1850
1852
|
};
|
|
1851
1853
|
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1852
1854
|
ref: dropdownRef,
|
|
1853
|
-
children: /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
"data-cy": "ticket-details-member-no-records-message",
|
|
1913
|
-
style: "body2",
|
|
1914
|
-
children: t("neetoTeamMembers.helpers.noRecords")
|
|
1915
|
-
})
|
|
1916
|
-
})]
|
|
1917
|
-
}, searchTerm)]
|
|
1918
|
-
})
|
|
1919
|
-
})
|
|
1855
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], (_jsx2 = {
|
|
1856
|
+
closeOnSelect: (_config$closeOnSelect = config === null || config === void 0 ? void 0 : config.closeOnSelect) !== null && _config$closeOnSelect !== void 0 ? _config$closeOnSelect : true,
|
|
1857
|
+
className: "w-full"
|
|
1858
|
+
}, _defineProperty(_jsx2, "closeOnSelect", false), _defineProperty(_jsx2, "isOpen", isDropdownOpen), _defineProperty(_jsx2, "position", "bottom-end"), _defineProperty(_jsx2, "ref", dropdownRef), _defineProperty(_jsx2, "targetClassName", "w-full"), _defineProperty(_jsx2, "customTarget", function customTarget() {
|
|
1859
|
+
return /*#__PURE__*/jsxRuntime.jsx(AssignDropdownTarget$2, {
|
|
1860
|
+
selectedMember: config === null || config === void 0 ? void 0 : config.selectedMember
|
|
1861
|
+
});
|
|
1862
|
+
}), _defineProperty(_jsx2, "onClick", function onClick() {
|
|
1863
|
+
return setIsDropdownOpen(ramda.not);
|
|
1864
|
+
}), _defineProperty(_jsx2, "onClose", function onClose() {
|
|
1865
|
+
return setSearchTerm("");
|
|
1866
|
+
}), _defineProperty(_jsx2, "children", /*#__PURE__*/jsxRuntime.jsxs(AssignList, {
|
|
1867
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(AssignList.Search, {
|
|
1868
|
+
searchTerm: searchTerm,
|
|
1869
|
+
handleClearSearchTerm: function handleClearSearchTerm() {
|
|
1870
|
+
return setSearchTerm("");
|
|
1871
|
+
},
|
|
1872
|
+
placeholder: config === null || config === void 0 ? void 0 : config.searchPlaceholder,
|
|
1873
|
+
onChange: function onChange(_ref2) {
|
|
1874
|
+
var value = _ref2.target.value;
|
|
1875
|
+
return setSearchTerm(value);
|
|
1876
|
+
}
|
|
1877
|
+
}), config !== null && config !== void 0 && config.isLoading ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1878
|
+
className: "flex w-full items-center justify-center py-8",
|
|
1879
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Spinner__default["default"], {})
|
|
1880
|
+
}) : /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1881
|
+
className: "ntm-assign-droplist__list-wrapper flex flex-col px-3",
|
|
1882
|
+
children: [options.map(function (_ref3, index) {
|
|
1883
|
+
var label = _ref3.label,
|
|
1884
|
+
value = _ref3.value,
|
|
1885
|
+
type = _ref3.type;
|
|
1886
|
+
return /*#__PURE__*/jsxRuntime.jsxs(require$$0.Fragment, {
|
|
1887
|
+
children: [type === SEARCH_TYPES.TEAM && /*#__PURE__*/jsxRuntime.jsx(AssignList.TeamsListItem, {
|
|
1888
|
+
active: (config === null || config === void 0 ? void 0 : config.selectedTeam.id) === value,
|
|
1889
|
+
teamName: label,
|
|
1890
|
+
onClick: function onClick() {
|
|
1891
|
+
return config === null || config === void 0 ? void 0 : config.handleUpdate({
|
|
1892
|
+
id: (config === null || config === void 0 ? void 0 : config.selectedTeam.value) === value ? null : value,
|
|
1893
|
+
isTeam: true
|
|
1894
|
+
});
|
|
1895
|
+
}
|
|
1896
|
+
}), type === SEARCH_TYPES.MEMBER && /*#__PURE__*/jsxRuntime.jsx(AssignList.MembersListItem, {
|
|
1897
|
+
active: (config === null || config === void 0 ? void 0 : config.selectedMember.value) === value,
|
|
1898
|
+
memberName: label,
|
|
1899
|
+
onClick: function onClick() {
|
|
1900
|
+
return handleClick(value);
|
|
1901
|
+
}
|
|
1902
|
+
})]
|
|
1903
|
+
}, index);
|
|
1904
|
+
}), ramda.isEmpty(options) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1905
|
+
className: "flex w-full items-center justify-center p-2",
|
|
1906
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
1907
|
+
"data-cy": "ticket-details-member-no-records-message",
|
|
1908
|
+
style: "body2",
|
|
1909
|
+
children: t("neetoTeamMembers.helpers.noRecords")
|
|
1910
|
+
})
|
|
1911
|
+
})]
|
|
1912
|
+
}, searchTerm)]
|
|
1913
|
+
})), _jsx2))
|
|
1920
1914
|
});
|
|
1921
1915
|
};
|
|
1922
1916
|
|
|
@@ -2363,61 +2357,17 @@ var useFetchCountries = function useFetchCountries(options) {
|
|
|
2363
2357
|
}, options));
|
|
2364
2358
|
};
|
|
2365
2359
|
|
|
2366
|
-
var
|
|
2367
|
-
|
|
2368
|
-
var timeZone = neetoCist.findBy({
|
|
2369
|
-
name: timeZoneName
|
|
2370
|
-
}, country.timeZones);
|
|
2371
|
-
return timeZone ? {
|
|
2372
|
-
country: country,
|
|
2373
|
-
timeZone: timeZone
|
|
2374
|
-
} : acc;
|
|
2375
|
-
}, {
|
|
2376
|
-
country: null,
|
|
2377
|
-
timeZone: null
|
|
2378
|
-
});
|
|
2379
|
-
};
|
|
2380
|
-
|
|
2381
|
-
var useCountries = function useCountries(user) {
|
|
2382
|
-
var _useState = require$$0.useState([]),
|
|
2360
|
+
var useCountries = function useCountries() {
|
|
2361
|
+
var _useState = require$$0.useState(null),
|
|
2383
2362
|
_useState2 = _slicedToArray(_useState, 2),
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
var _useState3 = require$$0.useState(null),
|
|
2387
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2388
|
-
selectedCountryOption = _useState4[0],
|
|
2389
|
-
setSelectedCountryOption = _useState4[1];
|
|
2390
|
-
var _useState5 = require$$0.useState(null),
|
|
2391
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
2392
|
-
selectedTimeZoneOption = _useState6[0],
|
|
2393
|
-
setSelectedTimeZoneOption = _useState6[1];
|
|
2363
|
+
selectedCountryOption = _useState2[0],
|
|
2364
|
+
setSelectedCountryOption = _useState2[1];
|
|
2394
2365
|
var _useFetchCountries = useFetchCountries(),
|
|
2395
2366
|
_useFetchCountries$da = _useFetchCountries.data,
|
|
2396
2367
|
_useFetchCountries$da2 = _useFetchCountries$da === void 0 ? {} : _useFetchCountries$da,
|
|
2397
2368
|
_useFetchCountries$da3 = _useFetchCountries$da2.countries,
|
|
2398
2369
|
countries = _useFetchCountries$da3 === void 0 ? [] : _useFetchCountries$da3,
|
|
2399
2370
|
isLoading = _useFetchCountries.isLoading;
|
|
2400
|
-
var formatTimeZoneOptions = function formatTimeZoneOptions(timeZones) {
|
|
2401
|
-
return (timeZones === null || timeZones === void 0 ? void 0 : timeZones.map(formatTimeZoneOption)) || [];
|
|
2402
|
-
};
|
|
2403
|
-
var formatTimeZoneOption = function formatTimeZoneOption(timeZone) {
|
|
2404
|
-
var currentTimeInUTC = new Date();
|
|
2405
|
-
var options = {
|
|
2406
|
-
timeZone: timeZone === null || timeZone === void 0 ? void 0 : timeZone.name,
|
|
2407
|
-
hour12: true,
|
|
2408
|
-
hour: "numeric",
|
|
2409
|
-
minute: "numeric"
|
|
2410
|
-
};
|
|
2411
|
-
var currentTime = currentTimeInUTC.toLocaleString("en-US", options);
|
|
2412
|
-
return {
|
|
2413
|
-
label: i18next.t("neetoTeamMembers.profile.common.timeZoneOption", {
|
|
2414
|
-
timeZone: ramda.replace("_", " ", timeZone === null || timeZone === void 0 ? void 0 : timeZone.name),
|
|
2415
|
-
currentTime: currentTime
|
|
2416
|
-
}),
|
|
2417
|
-
value: timeZone === null || timeZone === void 0 ? void 0 : timeZone.id,
|
|
2418
|
-
name: timeZone === null || timeZone === void 0 ? void 0 : timeZone.name
|
|
2419
|
-
};
|
|
2420
|
-
};
|
|
2421
2371
|
var formatCountryOption = function formatCountryOption(country) {
|
|
2422
2372
|
return {
|
|
2423
2373
|
label: country === null || country === void 0 ? void 0 : country.name,
|
|
@@ -2431,34 +2381,14 @@ var useCountries = function useCountries(user) {
|
|
|
2431
2381
|
setSelectedCountryOption(countryOption);
|
|
2432
2382
|
var dependentFields = {};
|
|
2433
2383
|
var selectedCountry = neetoCist.findById(countryOption.value, countries);
|
|
2434
|
-
var timeZoneOptions = formatTimeZoneOptions(selectedCountry.timeZones);
|
|
2435
|
-
setTimeZoneDropdownOptions(timeZoneOptions);
|
|
2436
|
-
if (neetoCist.isNotEmpty(timeZoneOptions)) {
|
|
2437
|
-
setSelectedTimeZoneOption(timeZoneOptions[0]);
|
|
2438
|
-
dependentFields.timeZone = timeZoneOptions[0].name;
|
|
2439
|
-
}
|
|
2440
2384
|
dependentFields.dateFormat = selectedCountry.dateFormat;
|
|
2441
2385
|
return dependentFields;
|
|
2442
2386
|
};
|
|
2443
|
-
require$$0.useEffect(function () {
|
|
2444
|
-
if (!neetoCist.isPresent(countries)) return;
|
|
2445
|
-
if (user !== null && user !== void 0 && user.timeZone) {
|
|
2446
|
-
var _findTimeZoneAndCount = findTimeZoneAndCountry(user.timeZone, countries),
|
|
2447
|
-
country = _findTimeZoneAndCount.country,
|
|
2448
|
-
timeZone = _findTimeZoneAndCount.timeZone;
|
|
2449
|
-
setSelectedCountryOption(formatCountryOption(country));
|
|
2450
|
-
setTimeZoneDropdownOptions(formatTimeZoneOptions(country === null || country === void 0 ? void 0 : country.timeZones));
|
|
2451
|
-
setSelectedTimeZoneOption(formatTimeZoneOption(timeZone));
|
|
2452
|
-
}
|
|
2453
|
-
}, [user, countries]);
|
|
2454
2387
|
return {
|
|
2455
2388
|
countryDropdownOptions: countryDropdownOptions,
|
|
2456
|
-
timeZoneDropdownOptions: timeZoneDropdownOptions,
|
|
2457
2389
|
selectedCountryOption: selectedCountryOption,
|
|
2458
|
-
selectedTimeZoneOption: selectedTimeZoneOption,
|
|
2459
2390
|
isFetchingCountriesList: isLoading,
|
|
2460
|
-
handleCountryChange: handleCountryChange
|
|
2461
|
-
handleTimeZoneChange: setSelectedTimeZoneOption
|
|
2391
|
+
handleCountryChange: handleCountryChange
|
|
2462
2392
|
};
|
|
2463
2393
|
};
|
|
2464
2394
|
|
|
@@ -2599,20 +2529,33 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
2599
2529
|
_user$timeZone = user.timeZone,
|
|
2600
2530
|
timeZone = _user$timeZone === void 0 ? "" : _user$timeZone,
|
|
2601
2531
|
_user$profileImageUrl = user.profileImageUrl,
|
|
2602
|
-
profileImageUrl = _user$profileImageUrl === void 0 ? "" : _user$profileImageUrl
|
|
2603
|
-
|
|
2532
|
+
profileImageUrl = _user$profileImageUrl === void 0 ? "" : _user$profileImageUrl,
|
|
2533
|
+
_user$countryId = user.countryId,
|
|
2534
|
+
countryId = _user$countryId === void 0 ? "" : _user$countryId;
|
|
2535
|
+
var _useCountries = useCountries(),
|
|
2604
2536
|
countryDropdownOptions = _useCountries.countryDropdownOptions,
|
|
2605
|
-
timeZoneDropdownOptions = _useCountries.timeZoneDropdownOptions,
|
|
2606
2537
|
selectedCountryOption = _useCountries.selectedCountryOption,
|
|
2607
|
-
selectedTimeZoneOption = _useCountries.selectedTimeZoneOption,
|
|
2608
2538
|
isFetchingCountriesList = _useCountries.isFetchingCountriesList,
|
|
2609
2539
|
_useCountries$handleC = _useCountries.handleCountryChange,
|
|
2610
|
-
handleCountryChange = _useCountries$handleC === void 0 ? neetoCist.noop : _useCountries$handleC
|
|
2611
|
-
_useCountries$handleT = _useCountries.handleTimeZoneChange,
|
|
2612
|
-
handleTimeZoneChange = _useCountries$handleT === void 0 ? neetoCist.noop : _useCountries$handleT;
|
|
2540
|
+
handleCountryChange = _useCountries$handleC === void 0 ? neetoCist.noop : _useCountries$handleC;
|
|
2613
2541
|
var _useUpdateProfileMuta = useUpdateProfileMutation(),
|
|
2614
2542
|
updateProfile = _useUpdateProfileMuta.mutate,
|
|
2615
2543
|
isUpdatingProfile = _useUpdateProfileMuta.isPending;
|
|
2544
|
+
var timezoneRef = require$$0.useCallback(function (_ref2) {
|
|
2545
|
+
var node = _ref2.node,
|
|
2546
|
+
setFieldValue = _ref2.setFieldValue;
|
|
2547
|
+
if (ramda.isNotNil(node)) {
|
|
2548
|
+
new neetoTimeZones.NeetoTimezoneSelector(node, {
|
|
2549
|
+
className: "w-full z-10",
|
|
2550
|
+
position: "bottom",
|
|
2551
|
+
initialValue: timeZone,
|
|
2552
|
+
onChange: function onChange(_ref3) {
|
|
2553
|
+
var utc = _ref3.utc;
|
|
2554
|
+
return setFieldValue("timeZone", utc[0]);
|
|
2555
|
+
}
|
|
2556
|
+
});
|
|
2557
|
+
}
|
|
2558
|
+
}, [timeZone]);
|
|
2616
2559
|
var initialFormValues = {
|
|
2617
2560
|
firstName: firstName,
|
|
2618
2561
|
lastName: lastName,
|
|
@@ -2624,7 +2567,7 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
2624
2567
|
}
|
|
2625
2568
|
};
|
|
2626
2569
|
var handleSubmit = /*#__PURE__*/function () {
|
|
2627
|
-
var
|
|
2570
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(values) {
|
|
2628
2571
|
var avatar, _yield$handleUploadIm, fileId, filePath, url, payload;
|
|
2629
2572
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
2630
2573
|
while (1) switch (_context.prev = _context.next) {
|
|
@@ -2661,7 +2604,6 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
2661
2604
|
};
|
|
2662
2605
|
case 14:
|
|
2663
2606
|
payload = _objectSpread$i(_objectSpread$i({}, values), {}, {
|
|
2664
|
-
timeZone: selectedTimeZoneOption === null || selectedTimeZoneOption === void 0 ? void 0 : selectedTimeZoneOption.name,
|
|
2665
2607
|
avatar: avatar
|
|
2666
2608
|
});
|
|
2667
2609
|
updateProfile({
|
|
@@ -2681,9 +2623,17 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
2681
2623
|
}, _callee, null, [[0, 18]]);
|
|
2682
2624
|
}));
|
|
2683
2625
|
return function handleSubmit(_x) {
|
|
2684
|
-
return
|
|
2626
|
+
return _ref4.apply(this, arguments);
|
|
2685
2627
|
};
|
|
2686
2628
|
}();
|
|
2629
|
+
require$$0.useEffect(function () {
|
|
2630
|
+
var country = neetoCist.findBy({
|
|
2631
|
+
value: countryId
|
|
2632
|
+
}, countryDropdownOptions);
|
|
2633
|
+
if (country) {
|
|
2634
|
+
handleCountryChange(country);
|
|
2635
|
+
}
|
|
2636
|
+
}, [countryId]);
|
|
2687
2637
|
if (isUpdatingProfile || isFetchingCountriesList || isFetchingUserDetails) {
|
|
2688
2638
|
return /*#__PURE__*/jsxRuntime.jsx(Container__default["default"], {
|
|
2689
2639
|
children: /*#__PURE__*/jsxRuntime.jsx(PageLoader__default["default"], {})
|
|
@@ -2698,9 +2648,11 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
2698
2648
|
validationSchema: PROFILE_VALIDATION_SCHEMA,
|
|
2699
2649
|
onSubmit: handleSubmit
|
|
2700
2650
|
},
|
|
2701
|
-
children: function children(
|
|
2702
|
-
var setFieldValue =
|
|
2703
|
-
values =
|
|
2651
|
+
children: function children(_ref5) {
|
|
2652
|
+
var setFieldValue = _ref5.setFieldValue,
|
|
2653
|
+
values = _ref5.values,
|
|
2654
|
+
errors = _ref5.errors,
|
|
2655
|
+
touched = _ref5.touched;
|
|
2704
2656
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
2705
2657
|
children: [/*#__PURE__*/jsxRuntime.jsxs(Pane__default["default"].Body, {
|
|
2706
2658
|
className: "w-full",
|
|
@@ -2736,31 +2688,36 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
2736
2688
|
onChange: function onChange(option) {
|
|
2737
2689
|
var dependentFields = handleCountryChange(option);
|
|
2738
2690
|
setFieldValue("dateFormat", dependentFields === null || dependentFields === void 0 ? void 0 : dependentFields.dateFormat);
|
|
2739
|
-
setFieldValue("
|
|
2691
|
+
setFieldValue("countryId", option === null || option === void 0 ? void 0 : option.value);
|
|
2740
2692
|
}
|
|
2741
|
-
}), /*#__PURE__*/jsxRuntime.
|
|
2693
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2742
2694
|
className: "space-y-2",
|
|
2743
|
-
children: /*#__PURE__*/jsxRuntime.
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2695
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2696
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
2697
|
+
required: true,
|
|
2698
|
+
children: t("neetoTeamMembers.profile.inputs.label.selectTimeZone")
|
|
2699
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
2700
|
+
className: "w-full flex-grow",
|
|
2701
|
+
"data-cy": "ntm-profile-time-zone-select",
|
|
2702
|
+
ref: function ref(node) {
|
|
2703
|
+
return timezoneRef({
|
|
2704
|
+
node: node,
|
|
2705
|
+
setFieldValue: setFieldValue
|
|
2706
|
+
});
|
|
2707
|
+
}
|
|
2708
|
+
})]
|
|
2709
|
+
}), touched.timeZone && errors.timeZone && /*#__PURE__*/jsxRuntime.jsx(Typography__default["default"], {
|
|
2710
|
+
children: errors.timeZone
|
|
2711
|
+
})]
|
|
2755
2712
|
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
2756
2713
|
children: [/*#__PURE__*/jsxRuntime.jsx(Label__default["default"], {
|
|
2757
2714
|
required: true,
|
|
2758
2715
|
children: t("neetoTeamMembers.profile.inputs.label.dateFormat")
|
|
2759
2716
|
}), /*#__PURE__*/jsxRuntime.jsx(Radio__default["default"], {
|
|
2760
2717
|
className: "mt-2 space-x-4",
|
|
2761
|
-
children: DATE_FORMAT_OPTIONS.map(function (
|
|
2762
|
-
var label =
|
|
2763
|
-
value =
|
|
2718
|
+
children: DATE_FORMAT_OPTIONS.map(function (_ref6) {
|
|
2719
|
+
var label = _ref6.label,
|
|
2720
|
+
value = _ref6.value;
|
|
2764
2721
|
return /*#__PURE__*/require$$0.createElement(Radio__default["default"].Item, {
|
|
2765
2722
|
label: label,
|
|
2766
2723
|
value: value,
|
|
@@ -10082,6 +10039,7 @@ var AssignDropdownTarget = function AssignDropdownTarget(_ref) {
|
|
|
10082
10039
|
};
|
|
10083
10040
|
|
|
10084
10041
|
var TeamsDropdown = function TeamsDropdown(_ref) {
|
|
10042
|
+
var _config$closeOnSelect;
|
|
10085
10043
|
var config = _ref.config;
|
|
10086
10044
|
var _useTranslation = reactI18next.useTranslation(),
|
|
10087
10045
|
t = _useTranslation.t;
|
|
@@ -10094,10 +10052,11 @@ var TeamsDropdown = function TeamsDropdown(_ref) {
|
|
|
10094
10052
|
var _config$availableTeam;
|
|
10095
10053
|
return config === null || config === void 0 || (_config$availableTeam = config.availableTeams) === null || _config$availableTeam === void 0 ? void 0 : _config$availableTeam.filter(function (_ref2) {
|
|
10096
10054
|
var label = _ref2.label;
|
|
10097
|
-
return label.toLowerCase().includes(trimmedSearchTerm.toLowerCase());
|
|
10055
|
+
return label === null || label === void 0 ? void 0 : label.toLowerCase().includes(trimmedSearchTerm.toLowerCase());
|
|
10098
10056
|
});
|
|
10099
10057
|
}, [config === null || config === void 0 ? void 0 : config.availableTeams, trimmedSearchTerm]);
|
|
10100
10058
|
return /*#__PURE__*/jsxRuntime.jsx(Dropdown__default["default"], {
|
|
10059
|
+
closeOnSelect: (_config$closeOnSelect = config === null || config === void 0 ? void 0 : config.closeOnSelect) !== null && _config$closeOnSelect !== void 0 ? _config$closeOnSelect : true,
|
|
10101
10060
|
className: "w-full",
|
|
10102
10061
|
customTarget: function customTarget() {
|
|
10103
10062
|
return /*#__PURE__*/jsxRuntime.jsx(AssignDropdownTarget, {
|