Skip to content

Instantly share code, notes, and snippets.

@Chadtech
Last active September 29, 2017 12:37
Show Gist options
  • Save Chadtech/ab516b88baf9f8714bcf7e27261e4f35 to your computer and use it in GitHub Desktop.
Save Chadtech/ab516b88baf9f8714bcf7e27261e4f35 to your computer and use it in GitHub Desktop.
-- as it is
type alias Model =
-- ..
, staff : List Staff
, services : List Service
-- ..
, serviceName : String
, staffName : String
, serviceOrStaff : ServiceOrStaff
, servicesInDropDown : List Service
, staffInDropDown : List Staff
-- ..
}
-- Maybe it should be this ..
type alias Model =
{ services : List ServiceModel }
type alias Service =
{ name : String
, id : String
, steps : List (Step, Maybe Employee)
, employee : Maybe Employee
}
type alias ServiceModel =
{ service : Maybe Service
, serviceDropDown : List Service
, employeeDropDown : List Employee
, employeeInput : String
, whatsInFocus : Focus
}
type Focus
= EmployeeInput
| ServiceInput
| EmployeeDropDown Index
| ServiceDropDown Index
| NothingInFocus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment