feat(reports): simplify dashboards, align OT flow labels, and normalize filters
This commit is contained in:
@@ -55,9 +55,9 @@ func TestWorkOrderTransition(t *testing.T) {
|
||||
wo, err := workorder.CreateWorkOrder(ctx, conn, "", "", "", "", 1, "", "")
|
||||
require.NoError(t, err)
|
||||
|
||||
wo2, err := workorder.TransitionStatus(ctx, conn, wo.ID, "open", "", "", "")
|
||||
wo2, err := workorder.TransitionStatus(ctx, conn, wo.ID, "in_progress", "", "", "")
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, "open", wo2.Status)
|
||||
assert.Equal(t, "in_progress", wo2.Status)
|
||||
|
||||
_, err = workorder.TransitionStatus(ctx, conn, wo.ID, "cancelled_invalid", "", "", "")
|
||||
assert.Error(t, err, "invalid transition should error")
|
||||
@@ -69,15 +69,11 @@ func TestAllowedTransitions(t *testing.T) {
|
||||
to string
|
||||
valid bool
|
||||
}{
|
||||
{"quote", "open", true},
|
||||
{"quote", "in_progress", true},
|
||||
{"quote", "cancelled", true},
|
||||
{"quote", "in_progress", false},
|
||||
{"open", "in_progress", true},
|
||||
{"open", "cancelled", true},
|
||||
{"open", "completed", false},
|
||||
{"quote", "open", false},
|
||||
{"in_progress", "completed", true},
|
||||
{"in_progress", "cancelled", true},
|
||||
{"in_progress", "open", false},
|
||||
{"completed", "invoiced", true},
|
||||
{"completed", "cancelled", true},
|
||||
{"invoiced", "cancelled", false},
|
||||
|
||||
Reference in New Issue
Block a user