Allow mixed-company cart, add delete confirmations, and fix profile settings routes.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import EmptyState from '@/components/ui/EmptyState.vue'
|
||||
import IconChevronBack from '@/components/icons/IconChevronBack.vue'
|
||||
import { formatCurrency, formatDate, formatNumber, toPersianDigits } from '@/utils/format'
|
||||
import { calculateCheckRass } from '@/utils/checkRass'
|
||||
import { confirm } from '@/composables/useConfirm'
|
||||
import type { CheckData } from '@/types'
|
||||
|
||||
const route = useRoute()
|
||||
@@ -68,9 +69,17 @@ function addAnother() {
|
||||
router.push('/checkout/check-form')
|
||||
}
|
||||
|
||||
function removeCheck(id: string) {
|
||||
orderStore.removeDraftCheck(id)
|
||||
async function removeCheck(id: string) {
|
||||
openMenuId.value = ''
|
||||
const ok = await confirm({
|
||||
title: 'حذف چک',
|
||||
message: 'آیا از حذف این چک مطمئن هستید؟',
|
||||
confirmLabel: 'حذف',
|
||||
cancelLabel: 'انصراف',
|
||||
tone: 'danger',
|
||||
})
|
||||
if (!ok) return
|
||||
orderStore.removeDraftCheck(id)
|
||||
}
|
||||
|
||||
function toggleMenu(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user