Redesign product detail page and fix icon/cart reactivity bugs

- SingleProduct.vue: rebuild gallery/header/action bar as a self-scrolling
  layout with a sticky photo, solid-on-scroll header matching PageBar, and
  a full-screen image preview (blurred overlay, centered thumbnail strip)
- Add GallerySlider.vue: pointer-based swipe carousel isolated in an
  LTR subtree, fixing RTL/transform sign mismatch that caused slide jumps
- Fix Icon.vue: icon was read into a plain ref once at setup and never
  updated on prop change; switch to computed so icon swaps (e.g. cart
  qty stepper trash/minus toggle) actually re-render
- Fix quantity stepper DOM order in SingleProduct.vue/CartItem.vue so
  plus/minus render correctly under RTL flex
- prisma/assign-downloaded-images.js: seed real product photos (FEATURED/
  FEATURED_MOBILE/GALLERY/GALLERY_MOBILE) onto the 5 placeholder products
This commit is contained in:
s.esmaeili
2026-09-18 16:22:31 +03:30
parent 53a304b5d5
commit b80fa9bcfb
73 changed files with 1035 additions and 180 deletions
@@ -0,0 +1,8 @@
-- Placeholder: the original migration.sql for this migration was lost from
-- disk (directory existed but was empty) while the database's
-- _prisma_migrations ledger already recorded it as applied and finished.
-- Recreated as an empty no-op file, then registered via
-- `prisma migrate resolve --applied`, so Prisma tooling stops blocking on
-- P3015 without re-running or guessing at SQL that already ran against this
-- database. The actual schema effect (CustomerKind.RETAIL) is present in
-- schema.prisma and already exists in the live database.
@@ -0,0 +1,12 @@
-- Placeholder: this migration is recorded as applied in the database's
-- _prisma_migrations ledger, but no migration.sql for it ever existed on
-- disk in this checkout (added Customer.firstName/lastName/productPercent
-- directly against the live DB, schema.prisma was never regenerated from it
-- as a tracked migration). Recreated as an empty no-op file purely so Prisma
-- CLI tooling (migrate status/dev) stops blocking on a missing-migration
-- error. Does not re-run or alter anything — the columns already exist live.
--
-- NOT reconciled with schema.prisma: Customer.firstName, Customer.lastName,
-- Customer.productPercent exist in the database but have no field in
-- prisma/schema.prisma's Customer model. This is a pre-existing drift,
-- separate from this change, and should be looked at on its own.
@@ -0,0 +1,12 @@
-- Placeholder: this migration is recorded as applied in the database's
-- _prisma_migrations ledger, but no migration.sql for it ever existed on
-- disk in this checkout (added Customer.parentAgentId + Customer.birthDate
-- directly against the live DB; schema.prisma was never regenerated from it
-- as a tracked migration). Recreated as an empty no-op file purely so Prisma
-- CLI tooling (migrate status/dev) stops blocking on a missing-migration
-- error. Does not re-run or alter anything — the columns already exist live.
--
-- NOT reconciled with schema.prisma: Customer.parentAgentId,
-- Customer.birthDate exist in the database but have no field in
-- prisma/schema.prisma's Customer model. This is a pre-existing drift,
-- separate from this change, and should be looked at on its own.
@@ -0,0 +1,5 @@
-- CreateEnum
CREATE TYPE "ProductImageRole" AS ENUM ('FEATURED', 'FEATURED_MOBILE', 'GALLERY', 'GALLERY_MOBILE');
-- AlterTable
ALTER TABLE "ProductImage" ADD COLUMN "role" "ProductImageRole" NOT NULL DEFAULT 'GALLERY';