key: Candidates
type: table
name: Candidate
itemName: Candidate
summary:
  title: "${firstName} ${lastName}"
  subtitle: "${identificationNumber}"
fields:
  identificationDocumentType:
    type: select
    label: Document Type
    required: true
    options:
      passport: Passport
      driversLicense: Driver's License
      other: Other
  identificationNumber:
    type: text
    label: Document Number
    required: true
  firstName:
    type: text
    label: First Name
    required: true
    description: It is the first name of the person
  lastName:
    type: text
    label: Last Name
    required: true
    description: It is the last name of the person
  age:
    type: number
    label: Age
    required: false
    description: It is the age of the person
form:
  rows:
  - _title: Personal Information
  - - firstName
    - lastName
  - - identificationDocumentType
    - identificationNumber
  - _title: Other Information
  - age
stages:
  new:
    name: New
    description: It is a new candidate, hasn't gone through any tests
  inProcess:
    name: In Process
    description: It has entered the process, but no outcome yet defined
  approved:
    name: Approved
    description: Candidate has been approved
    done: true
    successful: true
  rejected:
    name: Rejected
    description: Candidate has been rejected definitively
    done: true
    successful: false
initialStage: new
permissions:
  reviewer:
    create: true
    delete:
      own: true
      any: false
    view: true
    edit:
    - "*"
    - "!lastName"
  voter:
    create: false
    delete:
      own: true
    view:
      own:
      - "*"
      - "!firstName"
    edit:
      own:
      - firstName
      - lastName
      - identificationDocumentType
testData:
  '1':
    identificationDocumentType: cedula
    identificationNumber: 1712345678
    firstName: Pedro
    lastName: Perez
    age: 27
  '2':
    identificationDocumentType: cedula
    identificationNumber: 1912345672
    firstName: Joe
    lastName: Does
    age: 45
data:
  first:
    identificationDocumentType: cedula
    identificationNumber: 1712345678
    firstName: Alonso
    lastName: Vargas
    age: 27
  second:
    identificationDocumentType: cedula
    identificationNumber: 1912345672
    firstName: Florencia
    lastName: Rita
    age: 45
