Enable first operating day with staff assignments, opening guide, and ledger
This commit is contained in:
@@ -208,6 +208,7 @@ func _test_snapshot_contract() -> void:
|
||||
|
||||
var pre_effective_v2 := snapshot.duplicate(true)
|
||||
pre_effective_v2[&"version"] = 2
|
||||
pre_effective_v2.erase(&"work_assignments")
|
||||
for staff_snapshot: Dictionary in pre_effective_v2[&"staff"]:
|
||||
staff_snapshot.erase(&"snapshot_version")
|
||||
staff_snapshot.erase(&"employment_effective_minute")
|
||||
@@ -215,13 +216,14 @@ func _test_snapshot_contract() -> void:
|
||||
_expect(migrated_v2.restore_snapshot(pre_effective_v2), "pre-effective-minute v2 Staff snapshot migrates")
|
||||
_expect(migrated_v2.get_staff(&"a").employment_effective_minute == 0, "v2 legacy Staff employment starts at minute zero")
|
||||
_expect(
|
||||
migrated_v2.create_snapshot()[&"version"] == 3
|
||||
migrated_v2.create_snapshot()[&"version"] == StaffServiceType.SNAPSHOT_VERSION
|
||||
and migrated_v2.create_snapshot()[&"staff"][0][&"snapshot_version"] == 1,
|
||||
"v2 legacy Staff row is re-emitted in the current service and row schemas"
|
||||
)
|
||||
|
||||
var legacy := snapshot.duplicate(true)
|
||||
legacy[&"version"] = 1
|
||||
legacy.erase(&"work_assignments")
|
||||
legacy.erase(&"last_advanced_minute")
|
||||
legacy.erase(&"payroll_settlements")
|
||||
for staff_snapshot: Dictionary in legacy[&"staff"]:
|
||||
|
||||
Reference in New Issue
Block a user