snapshot schedule source data
This commit is contained in:
parent
14fe2fcb46
commit
f500bd6095
14 changed files with 84 additions and 87 deletions
|
|
@ -45,7 +45,7 @@ const bibleLayout = {
|
|||
const scheduleDetail = {
|
||||
schedule: {
|
||||
id: 73,
|
||||
set: { id: 41, name: 'Bible' },
|
||||
set: { name: 'Bible' },
|
||||
elementKind: 'chapter',
|
||||
startDate: '2026-08-10',
|
||||
targetDate: '2026-08-12',
|
||||
|
|
@ -55,8 +55,8 @@ const scheduleDetail = {
|
|||
date: '2026-08-10',
|
||||
assignments: [
|
||||
{
|
||||
id: 1,
|
||||
element: {
|
||||
id: 4,
|
||||
name: 'Chapter 1',
|
||||
kind: 'chapter',
|
||||
path: ['Genesis', 'Creation', 'Chapter 1'],
|
||||
|
|
@ -69,8 +69,8 @@ const scheduleDetail = {
|
|||
date: '2026-08-12',
|
||||
assignments: [
|
||||
{
|
||||
id: 2,
|
||||
element: {
|
||||
id: 5,
|
||||
name: 'Chapter 1',
|
||||
kind: 'chapter',
|
||||
path: ['Exodus', 'Chapter 1'],
|
||||
|
|
@ -213,7 +213,7 @@ describe('set scheduling', () => {
|
|||
schedules: [
|
||||
{
|
||||
id: 73,
|
||||
set: { id: 41, name: 'Bible' },
|
||||
set: { name: 'Bible' },
|
||||
elementKind: 'chapter',
|
||||
startDate: '2026-08-10',
|
||||
targetDate: '2026-08-12',
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ const isoDateSchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/)
|
|||
export const scheduleSummarySchema = z.object({
|
||||
id: z.number().int().positive(),
|
||||
set: z.object({
|
||||
id: z.number().int().positive(),
|
||||
name: z.string().min(1),
|
||||
}),
|
||||
elementKind: z.string().min(1),
|
||||
|
|
@ -19,8 +18,8 @@ export const scheduleSummarySchema = z.object({
|
|||
})
|
||||
|
||||
const scheduleAssignmentSchema = z.object({
|
||||
id: z.number().int().positive(),
|
||||
element: z.object({
|
||||
id: z.number().int().positive(),
|
||||
name: z.string().min(1),
|
||||
kind: z.string().min(1),
|
||||
path: z.array(z.string().min(1)).min(1),
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ function pluralKind(kind: string, count: number): string {
|
|||
<p v-if="day.assignments.length === 0" class="rest-day">Rest day</p>
|
||||
|
||||
<ul v-else class="assignment-list">
|
||||
<li v-for="assignment in day.assignments" :key="assignment.element.id">
|
||||
<li v-for="assignment in day.assignments" :key="assignment.id">
|
||||
<span class="assignment-path">{{ assignment.element.path.join(' / ') }}</span>
|
||||
<span class="assignment-kind">{{ humanizeKind(assignment.element.kind) }}</span>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue