chore(env): update application version to 2.2.7 in production environment
feat(image-upload): introduce ImageUploadField component for enhanced image uploads - Added ImageUploadField component to streamline image uploads with improved UI and functionality. - Integrated file upload handling with a new file service for better management of image uploads. - Updated SectionStep component to utilize ImageUploadField for icon uploads, enhancing user experience. - Refactored TenderListFilters to use isDateRangeActive utility for improved date range filtering logic.
This commit is contained in:
@@ -139,6 +139,16 @@ export const buildQueryString = (params: Record<string, any>): string => {
|
||||
export const serializeAxiosParams = buildQueryString;
|
||||
export const isValidAlpha2CountryCode = (code: string) => /^[A-Za-z]{2}$/.test(code);
|
||||
|
||||
/** True when a date-range filter value holds at least one usable (positive, finite) unix bound. */
|
||||
export const isDateRangeActive = (value: unknown): boolean => {
|
||||
if (!Array.isArray(value) || value.length === 0) return false;
|
||||
return value.some((bound) => {
|
||||
if (bound === undefined || bound === null || bound === "") return false;
|
||||
const n = typeof bound === "number" ? bound : Number(bound);
|
||||
return Number.isFinite(n) && n > 0;
|
||||
});
|
||||
};
|
||||
|
||||
export const getPaginatedRowNumber = ({
|
||||
index,
|
||||
page = 1,
|
||||
|
||||
Reference in New Issue
Block a user