feat(admin): implement order and customer operations experience
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

Orders dashboard (real orders-today/pending/paid/cancelled/refunded/customers/returning-customers/average-order/recent-activity/system-alerts, computed from the full order book not just the current page); orders list gains density, saved column visibility, bulk status change/archive/delete/export/print alongside existing search+status filter+pagination, sticky table header; order detail gets a visual status workflow stepper in business language (Pending/Packing/Shipping/Completed, with Cancelled/Refunded as terminal states) and a reusable OrderTimelineComponent replacing the flat text log; added a derived Customers feature (list + profile detail: statistics/lifetime value/addresses/orders/activity/notes) built entirely by grouping existing AdminOrder records by email - no new backend, no invented gateway, since no customer entity existed. Added archive/restore/delete to the orders gateway (soft-delete pattern mirroring categories) and filled in the adminOrders/adminCustomers i18n namespaces, which previously didn't exist at all (every adminOrders.* label was rendering as a raw key).
This commit is contained in:
sdarbinyan
2026-07-18 21:47:54 +04:00
parent ac615837ab
commit 097927f124
30 changed files with 1218 additions and 36 deletions

View File

@@ -1135,6 +1135,82 @@ export const hy: Translations = {
optionalDataMissingDescription: 'Optional config արժեքը բացակայում է։',
optionalDataMissingResolution: 'Ավելացրեք արժեքը, եթե UX-ը կախված է դրանից։',
},
adminOrders: {
back: 'Վերադառնալ պատվերներին',
search: 'Փնտրել ըստ պատվերի համարի, անվան, էլ. փոստի կամ հեռախոսի…',
export: 'Արտահանել',
view: 'Դիտել',
orderNumber: 'Պատվեր',
customer: 'Հաճախորդ',
payment: 'Վճարում',
delivery: 'Առաքում',
trackingNumber: 'Հետևման համար',
createdAt: 'Ստեղծված է',
items: 'Ապրանքներ',
timeline: 'Ժամանակագրություն',
notes: 'Նշումներ հաճախորդի համար',
internalNotes: 'Ներքին նշումներ',
addNote: 'Ավելացնել նշում',
changeStatus: 'Փոխել կարգավիճակը',
applyStatus: 'Կիրառել',
archiveSelected: 'Արխիվացնել',
printSelected: 'Տպել',
printInvoice: 'Տպել հաշիվ-ապրանքագիրը',
requestRefund: 'Հայցել վերադարձ',
cancelOrder: 'Չեղարկել պատվերը',
confirmCancel: 'Չեղարկե՞լ այս պատվերը։',
confirmRefund: 'Հայցե՞լ վերադարձ այս պատվերի համար։',
emptyTitle: 'Պատվերներ դեռ չկան',
emptyDescription: 'Պատվերները կհայտնվեն այստեղ հաճախորդների գնումներից հետո։',
column_customer: 'Հաճախորդ',
column_status: 'Կարգավիճակ',
column_payment: 'Վճարում',
column_total: 'Գումար',
column_created: 'Ստեղծված է',
status: {
pending: 'Սպասման մեջ',
processing: 'Փաթեթավորում',
shipped: 'Առաքվում է',
delivered: 'Ավարտված',
cancelled: 'Չեղարկված',
refunded: 'Վերադարձված',
},
paymentStatus: {
unpaid: 'Չվճարված',
paid: 'Վճարված',
refund_requested: 'Հայցվել է վերադարձ',
refunded: 'Վերադարձված',
},
ordersToday: 'Այսօրվա պատվերներ',
paidCount: 'Վճարված',
customersCount: 'Հաճախորդներ',
returningCustomers: 'Կրկնվող հաճախորդներ',
averageOrder: 'Միջին պատվեր',
recentActivity: 'Վերջին ակտիվությունը',
noRecentActivity: 'Ակտիվություն դեռ չկա։',
alertStuckPending: 'պատվեր սպասման մեջ է 48 ժամից ավելի',
alertRefundRequested: 'պատվեր սպասում է վերադարձի հայցի',
},
adminCustomers: {
search: 'Փնտրել ըստ անվան, էլ. փոստի կամ հեռախոսի…',
name: 'Անուն',
email: 'Էլ. փոստ',
phone: 'Հեռախոս',
orderCount: 'Պատվերներ',
lifetimeValue: 'Ընդհանուր գնումների գումար',
returning: 'Կրկնվող',
profile: 'Պրոֆիլ',
statistics: 'Վիճակագրություն',
firstOrder: 'Առաջին պատվեր',
lastOrder: 'Վերջին պատվեր',
addresses: 'Հասցեներ',
notes: 'Նշումներ',
notesUnavailable: 'Հաճախորդի մակարդակի նշումներ դեռ չկան․ ավելացրեք նշում նրա որևէ պատվերի վրա։',
orders: 'Պատվերներ',
activity: 'Ակտիվություն',
emptyTitle: 'Հաճախորդներ դեռ չկան',
emptyDescription: 'Հաճախորդները կհայտնվեն այստեղ առաջին պատվերից հետո։',
},
mediaLibrary: {
title: 'Մեդիագրադարան',
upload: 'Վերբեռնել',
@@ -1459,6 +1535,7 @@ export const hy: Translations = {
products: 'Ապրանքներ',
categories: 'Կատեգորիաներ',
orders: 'Պատվերներ',
customers: 'Հաճախորդներ',
transactions: 'Գործարքներ',
reviews: 'Կարծիքներ',
reports: 'Հաշվետվություններ',
@@ -1497,6 +1574,8 @@ export const hy: Translations = {
categoryEdit: { title: 'Կատեգորիայի խմբագրում', description: 'Փոփոխեք կատեգորիայի տվյալները' },
orders: { title: 'Պատվերներ', description: 'Դիտեք և մշակեք գնորդների պատվերները' },
orderDetail: { title: 'Պատվեր', description: 'Պատվերի մանրամասներն ու կարգավիճակը' },
customers: { title: 'Հաճախորդներ', description: 'Բոլորը, ովքեր պատվեր են կատարել' },
customerDetail: { title: 'Հաճախորդ', description: 'Հաճախորդի պրոֆիլ, պատվերներ և ակտիվություն' },
transactions: { title: 'Գործարքներ', description: 'Վճարումներ, վերադարձներ և կեղծիքի ստուգում' },
media: { title: 'Մեդիադարան', description: 'Ապրանքների և էջերի պատկերներ ու ֆայլեր' },
users: { title: 'Օգտատերեր', description: 'Ադմինիստրատորների թիմը և իրավունքները' },