Make boursecu branch boursecu-only and simplify app loading.

Remove multi-tenant branches and default views, show logo-only boot and splash screens, and polish boursecu transactions tab styling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 12:35:42 +02:00
co-authored by Cursor
parent 2affe61dd3
commit 59cceaf581
76 changed files with 211 additions and 2932 deletions
+6 -25
View File
@@ -1,7 +1,6 @@
import type { SelectItem } from '@/models/SelectItem'
import type { Product } from '@/models/products'
import type { WalletInventoryCard } from '@/models/walletAssets'
import { isBoursecuProject } from '@/utils/config'
import { useSettingsStore } from '@/store/settingsStore'
import {
isLegacyMaftolGroup,
@@ -25,10 +24,6 @@ export const BOURSECU_GROUP_MAFTOL = LEGACY_GROUP_MAFTOL
export const BOURSECU_WALLET_LABEL_GENERIC = 'موجودی کیف'
export function isBoursecuDealProductGroup(groupType?: string | null) {
if (!isBoursecuProject()) {
return false
}
const group = normalizeProductGroupType(groupType)
return group === BOURSECU_GROUP_MAFTOL
|| group === BOURSECU_GROUP_KATOD
@@ -38,7 +33,7 @@ export function isBoursecuDealProductGroup(groupType?: string | null) {
export function isMaftolMesGroup(groupType?: string | null) {
const group = normalizeProductGroupType(groupType)
return group === BOURSECU_GROUP_MAFTOL || (isBoursecuProject() && group === 'مس')
return group === BOURSECU_GROUP_MAFTOL || group === 'مس'
}
export function isKatodMesGroup(groupType?: string | null) {
@@ -46,10 +41,6 @@ export function isKatodMesGroup(groupType?: string | null) {
}
export function isShamshMesGroup(groupType?: string | null, title?: string | null) {
if (!isBoursecuProject()) {
return false
}
const group = normalizeProductGroupType(groupType)
if (group === 'شمش') {
return true
@@ -115,11 +106,9 @@ export function getProductWeightUnit(product?: ProductUnitSource | null) {
return unit
}
if (isBoursecuProject()) {
const group = normalizeProductGroupType(product?.group_type)
if (group === BOURSECU_GROUP_MAFTOL || group === BOURSECU_GROUP_KATOD || group === BOURSECU_GROUP_ABSHODE || group === 'مس' || isMeltedTradeGroup(group)) {
return getWeightUnit()
}
const group = normalizeProductGroupType(product?.group_type)
if (group === BOURSECU_GROUP_MAFTOL || group === BOURSECU_GROUP_KATOD || group === BOURSECU_GROUP_ABSHODE || group === 'مس' || isMeltedTradeGroup(group)) {
return getWeightUnit()
}
if (!isCountBasedProduct(product) || isMeltedTradeGroup(product?.group_type)) {
@@ -209,7 +198,7 @@ export function isCountBasedProduct(product?: ProductUnitSource | null) {
}
const group = normalizeProductGroupType(product.group_type)
if (group === BOURSECU_GROUP_MAFTOL || isLegacyMaftolGroup(group) || (isBoursecuProject() && group === 'مس')) {
if (group === BOURSECU_GROUP_MAFTOL || isLegacyMaftolGroup(group) || group === 'مس') {
return true
}
@@ -407,10 +396,6 @@ export function getProductDealMethodOptions(
): SelectItem[] {
const settingsStore = useSettingsStore()
if (!isBoursecuProject()) {
return getDefaultTypeDealOptions(context, isBuy)
}
if (isMaftolMesGroup(groupType)) {
if (isBuy) {
return [
@@ -518,10 +503,6 @@ export function getBoursecuMetalWalletLabel(groupType?: string | null) {
}
export function getGoldWalletLabel(groupType?: string | null) {
if (!isBoursecuProject()) {
return getMainMetalWalletLabel()
}
const group = normalizeProductGroupType(groupType)
if (group === BOURSECU_GROUP_MAFTOL
|| group === BOURSECU_GROUP_KATOD
@@ -575,7 +556,7 @@ export function formatCashWalletBalanceText(cashFormatted: string | number, grou
/** برچسب کیف فلزی متناسب با نحوه پرداخت (مثلاً کاتد مس برای خرید مفتول با کیف کاتد) */
export function getMetalWalletLabelForDealMethod(method?: string | null, groupType?: string | null) {
if (!isBoursecuProject() || method === 'katod') {
if (method === 'katod') {
return getMainMetalWalletLabel()
}