Schedule Olist sync from last completion
This commit is contained in:
@@ -184,7 +184,7 @@ const OlistSync = () => {
|
||||
<div className="rounded-2xl border border-dark-border bg-dark-card p-5">
|
||||
<div className="flex items-center justify-between"><span className="text-xs font-bold uppercase tracking-widest text-dark-muted">Execução atual</span><Timer className="h-4 w-4 text-brand-primary" /></div>
|
||||
<p className="mt-4 text-lg font-bold text-dark-text">{latestRun?.status === 'running' ? (latestRun.cancelRequestedAt ? 'Parando' : 'Em andamento') : 'Em espera'}</p>
|
||||
<p className="mt-1 text-xs font-semibold text-dark-muted">Duração: {formatDuration(latestRun?.startedAt || null, latestRun?.status === 'running' ? null : latestRun?.completedAt || null, now)}</p>
|
||||
<p className="mt-1 text-xs font-semibold text-dark-muted">{latestRun?.status === 'running' ? `Duração: ${formatDuration(latestRun.startedAt, null, now)}` : `Próxima automática: ${formatDateTime(status?.nextScheduledSyncAt || null)}`}</p>
|
||||
</div>
|
||||
<div className="rounded-2xl border border-dark-border bg-dark-card p-5">
|
||||
<div className="flex items-center justify-between"><span className="text-xs font-bold uppercase tracking-widest text-dark-muted">Estruturas</span><Database className="h-4 w-4 text-brand-primary" /></div>
|
||||
|
||||
@@ -246,6 +246,7 @@ export interface OlistStatus {
|
||||
connected: boolean;
|
||||
tokenExpiresAt: string | null;
|
||||
syncInProgress: boolean;
|
||||
nextScheduledSyncAt: string | null;
|
||||
productCache: {
|
||||
total: number;
|
||||
checked: number;
|
||||
|
||||
Reference in New Issue
Block a user