- Remove apps/dispatch/ (100% replaced by ops dispatch module, unmaintained) - Commit services/targo-hub/lib/ (24 modules, 6290 lines — was never tracked) - Commit services/docuseal + services/legacy-db docker-compose configs - Extract client app composables: useOTP, useAddressSearch, catalog data, format utils - Refactor CartPage.vue 630→175 lines, CatalogPage.vue 375→95 lines - Clean hardcoded credentials from config.js fallback values - Add client portal: catalog, cart, checkout, OTP verification, address search - Add ops: NetworkPage, AgentFlowsPage, ConversationPanel, UnifiedCreateModal - Add ops composables: useBestTech, useConversations, usePermissions, useScanner - Add field app: scanner composable, docker/nginx configs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
16 lines
477 B
JavaScript
16 lines
477 B
JavaScript
export const formatPrice = (val) => val.toFixed(2) + ' $'
|
|
|
|
// Strip +1/1 prefix from E.164 phone → 10-digit local format for mask
|
|
export function normalizePhone (raw) {
|
|
if (!raw) return ''
|
|
const digits = raw.replace(/\D/g, '')
|
|
return digits.length === 11 && digits.startsWith('1') ? digits.slice(1) : digits
|
|
}
|
|
|
|
// Minimum booking date (J+3)
|
|
export function minBookingDate () {
|
|
const d = new Date()
|
|
d.setDate(d.getDate() + 3)
|
|
return d.toISOString().slice(0, 10)
|
|
}
|