diff --git a/worklenz-backend/database/migrations/20250427000000-fix-progress-mode-type.sql b/worklenz-backend/database/migrations/20250427000000-fix-progress-mode-type.sql index 557b1bc5..6e5efc9d 100644 --- a/worklenz-backend/database/migrations/20250427000000-fix-progress-mode-type.sql +++ b/worklenz-backend/database/migrations/20250427000000-fix-progress-mode-type.sql @@ -145,7 +145,7 @@ BEGIN SET progress_value = NULL, progress_mode = NULL WHERE project_id = _project_id - AND progress_mode = _old_mode; + AND progress_mode::text::progress_mode_type = _old_mode; END IF; RETURN NEW; diff --git a/worklenz-frontend/src/components/admin-center/billing/current-bill.tsx b/worklenz-frontend/src/components/admin-center/billing/current-bill.tsx index 7eacbae2..72188293 100644 --- a/worklenz-frontend/src/components/admin-center/billing/current-bill.tsx +++ b/worklenz-frontend/src/components/admin-center/billing/current-bill.tsx @@ -1,21 +1,17 @@ -import { Button, Card, Col, Modal, Row, Tooltip, Typography } from 'antd'; +import { Card, Col, Row, Tooltip, Typography } from 'antd'; import React, { useEffect } from 'react'; import './current-bill.css'; import { InfoCircleTwoTone } from '@ant-design/icons'; import ChargesTable from './billing-tables/charges-table'; import InvoicesTable from './billing-tables/invoices-table'; -import UpgradePlansLKR from './drawers/upgrade-plans-lkr/upgrade-plans-lkr'; -import UpgradePlans from './drawers/upgrade-plans/upgrade-plans'; + import { useAppSelector } from '@/hooks/useAppSelector'; import { useAppDispatch } from '@/hooks/useAppDispatch'; import { useMediaQuery } from 'react-responsive'; import { useTranslation } from 'react-i18next'; -import { - toggleDrawer, - toggleUpgradeModal, -} from '@/features/admin-center/billing/billing.slice'; + import { fetchBillingInfo, fetchFreePlanSettings } from '@/features/admin-center/admin-center.slice'; -import RedeemCodeDrawer from './drawers/redeem-code-drawer/redeem-code-drawer'; + import CurrentPlanDetails from './current-plan-details/current-plan-details'; import AccountStorage from './account-storage/account-storage'; import { useAuthService } from '@/hooks/useAuth'; @@ -25,9 +21,7 @@ const CurrentBill: React.FC = () => { const dispatch = useAppDispatch(); const { t } = useTranslation('admin-center/current-bill'); const themeMode = useAppSelector(state => state.themeReducer.mode); - const { isUpgradeModalOpen } = useAppSelector(state => state.adminCenterReducer); const isTablet = useMediaQuery({ query: '(min-width: 1025px)' }); - const browserTimeZone = Intl.DateTimeFormat().resolvedOptions().timeZone; const currentSession = useAuthService().getCurrentSession(); useEffect(() => { @@ -46,42 +40,7 @@ const CurrentBill: React.FC = () => { const renderMobileView = () => (
- {t('currentPlanDetails')}} - extra={ -
- - dispatch(toggleUpgradeModal())} - width={1000} - centered - okButtonProps={{ hidden: true }} - cancelButtonProps={{ hidden: true }} - > - {browserTimeZone === 'Asia/Colombo' ? : } - -
- } - > -
-
- {t('cardBodyText01')} - {t('cardBodyText02')} -
- - -
-
+