added tour
This commit is contained in:
@@ -18,11 +18,15 @@ const HPTEL_TYPES = "dashboard/dashboard-tickets-settings-hotel-type/";
|
||||
const NEWS = "dashboard/dashboard-post/";
|
||||
const NEWS_CATEGORY = "dashboard/dashboard-category/";
|
||||
const HOTEL = "dashboard/dashboard-hotel/";
|
||||
const FAQ = "dashboard/dashboard-faq/";
|
||||
const FAQ_CATEGORIES = "dashboard/dashboard-faq-category/";
|
||||
|
||||
export {
|
||||
AUTH_LOGIN,
|
||||
BASE_URL,
|
||||
DOWNLOAD_PDF,
|
||||
FAQ,
|
||||
FAQ_CATEGORIES,
|
||||
GET_ALL_AGENCY,
|
||||
GET_ALL_EMPLOYEES,
|
||||
GET_ALL_USERS,
|
||||
|
||||
@@ -17,18 +17,15 @@ const formatPrice = (amount: number | string, withLabel = false): string => {
|
||||
: " so‘m"
|
||||
: "";
|
||||
|
||||
// Agar qiymat bo‘sh yoki 0 bo‘lsa — hech narsa ko‘rsatmaymiz
|
||||
if (
|
||||
amount === "" ||
|
||||
amount === null ||
|
||||
amount === undefined ||
|
||||
Number(amount) === 0
|
||||
)
|
||||
return "";
|
||||
// Agar qiymat bo‘sh yoki null/undefined bo‘lsa — hech narsa ko‘rsatmaymiz
|
||||
if (amount === "" || amount === null || amount === undefined) return "";
|
||||
|
||||
// Faqat raqamlarni qoldiramiz
|
||||
const numeric = String(amount).replace(/\D/g, "");
|
||||
|
||||
// Agar hech qanday raqam kiritilmagan bo‘lsa, bo‘sh qaytaramiz
|
||||
if (numeric === "") return "";
|
||||
|
||||
// Raqamni 3 xonadan ajratamiz
|
||||
const formatted = numeric.replace(/\B(?=(\d{3})+(?!\d))/g, " ");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user