/app/source/models/count.coffee

https://bitbucket.org/jorritposthuma/inventory-counter-mobile · CoffeeScript · 18 lines · 16 code · 2 blank · 0 comment · 1 complexity · 6b9d498893992a4ca6c7fb4c11145e36 MD5 · raw file

  1. class Count extends Model
  2. @status =
  3. ERROR: -1
  4. UPLOAD: 0
  5. PROCESS: 1
  6. MAP: 2
  7. COUNT: 3
  8. FINAL: 4
  9. @statusToString = (status) ->
  10. switch status
  11. when -1 then "error"
  12. when 0 then "upload"
  13. when 1 then "process"
  14. when 2 then "map"
  15. when 3 then "count"
  16. when 4 then "final"