Fix dashboard production builds and default list pages to 24 items.

Unblock business/customer deploys and match the 24-per-page list rule in Super Admin.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-08-13 15:19:46 +03:30
co-authored by Cursor
parent cc94b929e0
commit c16ec3787b
9 changed files with 15 additions and 20 deletions
@@ -1,7 +1,7 @@
import { Link } from 'react-router-dom'
import { Pencil, MessageSquare, Trash2, Play } from 'lucide-react'
import { useLocale } from '@meshkee/dashboard-ui'
import type { Video } from '../types/instruction'
import type { Instruction } from '../types/instruction'
import {
formatInstructionAuthor,
formatInstructionCardDate,
@@ -14,7 +14,7 @@ import cardStyles from './BlogCard.module.css'
import controlStyles from './ProductCard.module.css'
interface InstructionCardProps {
video: Video
video: Instruction
commentCount: number
onEdit: (id: string) => void
onComments: (id: string) => void
-1
View File
@@ -6,7 +6,6 @@ import {
Store,
Users,
Settings,
FileText,
Briefcase,
Globe,
Layers,
-6
View File
@@ -67,12 +67,6 @@ const en = {
'nav.instructions.new': 'Add New Instruction',
'nav.instructions.categories': 'Categories',
'nav.instructions.settings': 'Settings',
'nav.instructions': 'Instructions',
'nav.instructions.overview': 'Overview',
'nav.instructions.list': 'My Instructions',
'nav.instructions.new': 'Add New Instruction',
'nav.instructions.categories': 'Categories',
'nav.instructions.settings': 'Settings',
'nav.website': 'Website',
'nav.website.overview': 'Overview',
'nav.website.sliders': 'Sliders',
+1 -1
View File
@@ -1,4 +1,4 @@
import { FileText, Play, GraduationCap } from 'lucide-react'
import { FileText, GraduationCap } from 'lucide-react'
import { SectionCard } from '../components/SectionCard'
import { Breadcrumbs } from '../components/Breadcrumbs'
import { PageTitle } from '../components/PageTitle'
@@ -17,7 +17,7 @@ import {
listInstructions,
resolveInstructionTitle,
} from '../services/instructionService'
import type { Video } from '../types/instruction'
import type { Instruction } from '../types/instruction'
import pageStyles from '../components/PageContent.module.css'
import styles from './BlogPage.module.css'
@@ -26,7 +26,7 @@ export function InstructionListPage() {
const { showToast } = useToast()
const t = useT()
const { locale } = useLocale()
const [videos, setInstructions] = useState<Video[]>([])
const [videos, setInstructions] = useState<Instruction[]>([])
const [totalInstructions, setTotalVideos] = useState(0)
const [currentPage, setCurrentPage] = useState(1)
const [isLoading, setIsLoading] = useState(true)
@@ -5,6 +5,7 @@ import { Switch } from '../components/Switch'
import { Tooltip } from '../components/Tooltip'
import { useToast } from '../context/ToastContext'
import { useT } from '../i18n/useT'
import type { BusinessMessageKey } from '../i18n/messages'
import { ApiError } from '../lib/api'
import {
DEFAULT_EPAYMENT_SETTINGS,
@@ -19,8 +20,8 @@ import styles from './WebsiteEPaymentPage.module.css'
const COMING_SOON_GATEWAYS: {
id: Exclude<PaymentGatewayId, 'mellat'>
nameKey: string
descKey: string
nameKey: BusinessMessageKey
descKey: BusinessMessageKey
}[] = [
{
id: 'sep',
@@ -199,7 +200,7 @@ export function WebsiteEPaymentPage() {
id="epayment-master"
checked={ePayment.enabled}
disabled={savingKey !== null}
onCheckedChange={(checked) => void handleMasterToggle(checked)}
onChange={(checked) => void handleMasterToggle(checked)}
/>
</div>
</div>
@@ -218,7 +219,7 @@ export function WebsiteEPaymentPage() {
id="epayment-mellat"
checked={ePayment.gateways.mellat.enabled}
disabled={savingKey !== null || !ePayment.enabled}
onCheckedChange={(checked) => void handleMellatToggle(checked)}
onChange={(checked) => void handleMellatToggle(checked)}
/>
</div>
@@ -41,6 +41,7 @@ export function CheckoutResultStep() {
return
}
const paymentStatus = status
const controller = new AbortController()
async function load() {
@@ -53,7 +54,7 @@ export function CheckoutResultStep() {
setPlacedOrder(data.order)
setPayment(
buildPaymentInfoFromOrder(data.order, {
status,
status: paymentStatus,
transactionId,
trackId,
message,
@@ -63,7 +64,7 @@ export function CheckoutResultStep() {
if (isAbortError(err)) return
// Still show result shell with query payment data if order fetch fails
setPayment({
status: status!,
status: paymentStatus,
transactionId,
trackId,
message:
@@ -79,7 +79,7 @@ import { Pagination } from '@meshkee/dashboard-ui'
import pageStyles from '../components/PageContent.module.css'
import styles from './BusinessesPage.module.css'
const DEFAULT_PAGE_SIZE = 10
const DEFAULT_PAGE_SIZE = 24
const DEFAULT_LOCALE: DashboardLocale = 'fa'
const DEFAULT_THEME_MODE: DashboardThemeMode = 'light'
+1 -1
View File
@@ -34,7 +34,7 @@ import pageStyles from '../components/PageContent.module.css'
import tableStyles from './BusinessesPage.module.css'
import styles from './WebsitesPage.module.css'
const PAGE_SIZE = 10
const PAGE_SIZE = 24
function daysUntilExpiry(expiresAt: string | null) {
if (!expiresAt) return null