added tour

This commit is contained in:
Samandar Turgunboyev
2025-10-27 12:54:47 +05:00
parent eca7370833
commit a9e99f9755
10 changed files with 405 additions and 217 deletions

View File

@@ -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,

View File

@@ -17,18 +17,15 @@ const formatPrice = (amount: number | string, withLabel = false): string => {
: " som"
: "";
// Agar qiymat bosh yoki 0 bolsa — hech narsa korsatmaymiz
if (
amount === "" ||
amount === null ||
amount === undefined ||
Number(amount) === 0
)
return "";
// Agar qiymat bosh yoki null/undefined bolsa — hech narsa korsatmaymiz
if (amount === "" || amount === null || amount === undefined) return "";
// Faqat raqamlarni qoldiramiz
const numeric = String(amount).replace(/\D/g, "");
// Agar hech qanday raqam kiritilmagan bolsa, bosh qaytaramiz
if (numeric === "") return "";
// Raqamni 3 xonadan ajratamiz
const formatted = numeric.replace(/\B(?=(\d{3})+(?!\d))/g, " ");