Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| abf5210de6 |
@@ -120,7 +120,7 @@ export default function SyncPage() {
|
|||||||
{step === 1 && (
|
{step === 1 && (
|
||||||
<div className="flex flex-col items-center gap-4 py-8">
|
<div className="flex flex-col items-center gap-4 py-8">
|
||||||
<p className="text-slate-400 text-sm text-center max-w-md">
|
<p className="text-slate-400 text-sm text-center max-w-md">
|
||||||
Lit Google Sheets et compare avec le catalogue Shopify actuel pour générer l'aperçu des changements.
|
Lit Google Sheets et compare avec le catalogue Shopify actuel pour générer l'aperçu des changements.
|
||||||
</p>
|
</p>
|
||||||
{error && (
|
{error && (
|
||||||
<div className="bg-red-950 border border-red-800 text-red-300 text-sm rounded-lg px-4 py-2 max-w-md">
|
<div className="bg-red-950 border border-red-800 text-red-300 text-sm rounded-lg px-4 py-2 max-w-md">
|
||||||
@@ -146,7 +146,7 @@ export default function SyncPage() {
|
|||||||
onClick={() => { setStep(1); setDiff(null) }}
|
onClick={() => { setStep(1); setDiff(null) }}
|
||||||
className="px-4 py-2 text-sm bg-slate-800 hover:bg-slate-700 text-slate-300 rounded-lg"
|
className="px-4 py-2 text-sm bg-slate-800 hover:bg-slate-700 text-slate-300 rounded-lg"
|
||||||
>
|
>
|
||||||
← Relancer l'analyse
|
← Relancer l'analyse
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => setStep(3)}
|
onClick={() => setStep(3)}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { NextRequest, NextResponse } from 'next/server'
|
import { NextResponse } from 'next/server'
|
||||||
import { prisma } from '@/lib/prisma'
|
import { prisma } from '@/lib/prisma'
|
||||||
import type { SyncHistoryEntry, SyncLogEntry } from '@/types/sync'
|
import type { SyncHistoryEntry, SyncLogEntry } from '@/types/sync'
|
||||||
|
|
||||||
export async function GET(_req: NextRequest) {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const runs = await prisma.syncRun.findMany({
|
const runs = await prisma.syncRun.findMany({
|
||||||
orderBy: { createdAt: 'desc' },
|
orderBy: { createdAt: 'desc' },
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { NextRequest, NextResponse } from 'next/server'
|
import { NextResponse } from 'next/server'
|
||||||
import { readSheetProducts } from '@/lib/googleSheets'
|
import { readSheetProducts } from '@/lib/googleSheets'
|
||||||
import { fetchAllShopifyProducts } from '@/lib/shopifySync'
|
import { fetchAllShopifyProducts } from '@/lib/shopifySync'
|
||||||
import { computeDiff } from '@/lib/syncDiff'
|
import { computeDiff } from '@/lib/syncDiff'
|
||||||
|
|
||||||
export async function GET(_req: NextRequest) {
|
export async function GET() {
|
||||||
try {
|
try {
|
||||||
const [sheetProducts, shopifyProducts] = await Promise.all([
|
const [sheetProducts, shopifyProducts] = await Promise.all([
|
||||||
readSheetProducts(),
|
readSheetProducts(),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import type { SyncChange, SyncChangeType, DiffResult } from '@/types/sync'
|
import type { SyncChangeType, DiffResult } from '@/types/sync'
|
||||||
|
|
||||||
interface DiffTableProps {
|
interface DiffTableProps {
|
||||||
diff: DiffResult
|
diff: DiffResult
|
||||||
|
|||||||
Reference in New Issue
Block a user