diff --git a/src/routes/dashboard/projects/[id]/+page.svelte b/src/routes/dashboard/projects/[id]/+page.svelte index 6b0993c..6223979 100644 --- a/src/routes/dashboard/projects/[id]/+page.svelte +++ b/src/routes/dashboard/projects/[id]/+page.svelte @@ -41,7 +41,123 @@ + +

{data.project.name}

+
+

+ Created + + {relativeDate(data.project.createdAt)} + + ∙ Updated + + {relativeDate(data.project.updatedAt)} + + ∙ {Math.floor(data.project.timeSpent / 60)}h {data.project.timeSpent % 60}min +

+
+ +
+ {#key data.project.status} + {#if data.project.status === 'rejected' || data.project.status === 'rejected_locked'} +
+
+
+
+ + + Rejected + +
+ {:else} +
+
+
+
+
+ {#each [ + { key: 'submitted', label: 'Submitted', color: 'bg-indigo-400' }, + { key: 't1_approved', label: 'On print queue', color: 'bg-yellow-400' }, + { key: 'printing', label: 'Being printed', color: 'bg-emerald-400' }, + { key: 'printed', label: 'Printed', color: 'bg-blue-400' }, + { key: 'finalized', label: 'Payout', color: 'bg-green-200' } + ] as step, i (step.key)} +
+
= i} + class:bg-gray-200={[ + 'submitted', + 't1_approved', + 'printing', + 'printed', + 'finalized' + ].indexOf(data.project.status) < i} + class:border-primary-500={[ + 'submitted', + 't1_approved', + 'printing', + 'printed', + 'finalized' + ].indexOf(data.project.status) >= i} + class:border-gray-300={[ + 'submitted', + 't1_approved', + 'printing', + 'printed', + 'finalized' + ].indexOf(data.project.status) < i} + class:{step.color}={true} + style="box-shadow: 0 2px 8px 0 rgba(0,0,0,0.07);" + >
+
+ {/each} +
+
+ {#each [ + { key: 'submitted', label: 'Submitted' }, + { key: 't1_approved', label: 'On print queue' }, + { key: 'printing', label: 'Being printed' }, + { key: 'printed', label: 'Printed' }, + { key: 'finalized', label: 'Payout' } + ] as step, i (step.key)} +
+ = i} + class:text-gray-400={[ + 'submitted', + 't1_approved', + 'printing', + 'printed', + 'finalized' + ].indexOf(data.project.status) < i} + >{step.label} +
+ {/each} +
+
+ {/if} + {/key} +