{
  "workspace": "Yatrana",
  "apps": {
    "Recruitment": {
      "app": {
        "id": "Recruitment",
        "type": "app",
        "name": "Recruitment",
        "icon": "recruitment-card",
        "color": "#F5FFFA",
        "active": false,
        "menuItems": [
           {
            "type": "table",
            "target": "Recruiters"
           }
        ],
        "roles": {
           "recruiter": {
              "name": "Recruiter",
              "description": "Allows the user to perform any operation in this app"
           },
           "interviewer": {
              "name": "Interviewer",
              "description": "Allows to see only the information of the candidates they are interviewing."
           }
        }
     },
      "processes": {
        "processExample1": {
         "id": "3ea215cb-759d-4919-a3b1-732f354041cd",
         "key": "processExample1",
         "type": "process",
         "name": "Start Recruitment",
         "icon": "person",
         "mainTable": "invitation",
         "permissions": {
            "recruiter": true
         },
         "fieldGroups": {
            "summary": {
               "id": "3ea215cb-759d-4919-a3b1-732f354041cd",
               "key": "summary",
               "readOnly": true,
               "rows": [
                  [
                     "identificationDocumentType",
                     "fullName"
                  ]
               ]
            },
            "summaryWithScores": {
               "id": "3ea215cb-759d-4919-a3b1-732f354041cd",
               "key": "summaryWithScores",
               "readOnly": true,
               "rows": [
                  "identificationDocumentType"
               ]
            }
         },
         "forms": {
            "fillOutInvitationInformation": {
               "id": "3ea215cb-759d-4919-a3b1-732f354041cd",
               "key": "fillOutInvitationInformation",
               "name": "Start application",
               "rows": [
                  "identificationDocumentType",
                  "fullName"
               ]
            },
            "fillOutScores": {
               "id": "3ea215cb-759d-4919-a3b1-732f354041cd",
               "key": "fillOutScores",
               "name": "Fill out scores",
               "title": "Fill out scores for {{candidate.firstName}} {{candidate.lastName}} - {{candidate.email}}",
               "rows": [
                  "_groups.3ea215cb-759d-4919-a3b1-732f354041cd",
                  {
                     "_title": "Scores"
                  },
                  {
                     "_statement": "Please enter the candidate scores"
                  },
                  "identificationDocumentType"
               ]
            },
            "manualApproval1": {
               "id": "3ea215cb-759d-4919-a3b1-732f354041cd",
               "key": "manualApproval1",
               "name": "Manual Approval 1",
               "rows": [
                  "_groups.3ea215cb-759d-4919-a3b1-732f354041cd",
                  "identificationDocumentType"
               ],
               "outcomes": {
                  "approve": "Approve",
                  "reject": {
                     "title": "Reject",
                     "form": {
                        "rows": [
                           "identificationDocumentType"
                        ]
                      }
                   }
                }
             }
          }
        }
      },
      "tables": {
        "Recruiters": {
          "id": "Recruiters",
          "type": "table",
          "name": "Recruiter",
          "itemName": "Recruiter",
          "summary": {
             "title": "${id} - ${Recruiter} ${lastName}",
             "subtitle": "${Recruiter}"
          },
          "fields": {
             "identificationDocumentType": {
                "type": "select",
                "label": "Document Type",
                "required": false,
                "dataType": "text",
                "options": {
                   "passport": "Passport",
                   "driversLicense": "Driver's License",
                   "other": "Other"
                }
             },
             "identificationNumber": {
                "type": "text",
                "label": "Document Number",
                "required": true
             },
             "fullName": {
                "type": "text",
                "label": "Full Name",
                "required": true,
                "description": "It is the first name of the candidate"
             }
          },
          "form": {
             "rows": [
                {
                   "_title": "Personal Information"
                },
                [
                   "fullName"
                ]
             ]
          },
          "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
             },
             "shortTermPool": {
                "name": "Short Term Pool",
                "description": "Candidate is not a fit now, but probably in the near future",
                "parked": true
             },
             "longTermPool": {
                "name": "Long Term Pool",
                "description": "Candidate is not a fit now, and doesn't seem to be a fit in the near future",
                "parked": true
             }
          },
          "initialStage": "new",
          "permissions": {
             "recruiter": {
                "create": true,
                "delete": {
                   "own": true,
                   "any": false
                },
                "view": true,
                "edit": [
                   "*",
                   "!identificationDocumentType"
                ]
             },
             "interviewer": {
                "create": false,
                "delete": {
                   "own": true
                },
                "view": {
                   "own": [
                      "*",
                      "!identificationDocumentType"
                   ]
                },
                "edit": {
                   "own": [
                      "identificationDocumentType",
                      "fullName"
                   ]
                }
             }
          },
          "testData": {
             "1": {
                "identificationDocumentType": "cedula",
                "identificationNumber": 302493049,
                "fullName": "Maria Martina Merida Mejias"
             },
             "2": {
                "identificationDocumentType": "cedula",
                "identificationNumber": 292493049,
                "fullName": "Jaime Vera"
             }
          },
          "data": {
             "1": {
                "identificationDocumentType": "cedula",
                "identificationNumber": 302493049,
                "fullName": "Maria Martina Merida Mejias"
             },
             "2": {
                "identificationDocumentType": "cedula",
                "identificationNumber": 292493049,
                "fullName": "Jaime Vera"
             }
          }
       }
      }
    },
    "Elections": {
      "app": {
        "id": "Elections",
        "type": "app",
        "name": "Election",
        "icon": "election-card",
        "color": "#F5FFFA",
        "active": true,
        "menuItems": [
           {
              "type": "table",
              "target": "candidates"
           },
           {
              "type": "table",
              "target": "cities"
           }
        ],
        "roles": {
           "reviewer": {
              "name": "Reviewer",
              "description": "Count the votes."
           },
           "voter": {
              "name": "Voter",
              "description": "Person that votes."
           }
        }
     },
     "processes": {},
     "tables": {
       "Candidates": {
          "id": "Candidates",
          "type": "table",
          "name": "Candidate",
          "itemName": "Candidate",
          "summary": {
            "title": "${firstName} ${lastName}",
            "subtitle": "${identificationNumber}"
          },
          "fields": {
            "identificationDocumentType": {
                "type": "select",
                "label": "Document Type",
                "required": true,
                "dataType": "text",
                "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", "middleName", "lastName"],
                "email",
                ["identificationDocumentType", "identificationNumber"],
                {
                  "_title": "Other Information"
                },
                "salary"
            ]
          },
          "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
            }
          }
      },
      "Cities": {
        "id": "Cities",
        "type": "table",
        "name": "City",
        "itemName": "City",
        "summary": {
           "title": "${id} - ${code}",
           "subtitle": "${name}"
        },
        "fields": {
           "Address": {
              "type": "text",
              "label": "Address",
              "required": true,
              "description": "Address of category"
           },
           "Description": {
              "type": "text",
              "label": "Description",
              "required": false
           },
           "CodeZip": {
              "type": "number",
              "label": "CodeZip",
              "required": false
           }
        },
        "form": {
           "rows": [
              {
                 "_title": "Personal Information"
              },
              ["name", "description", "status"],
              "email",
              ["identificationDocumentType", "identificationNumber"],
              {
                 "_title": "Other Information"
              },
              "salary"
           ]
        },
        "permissions": {
           "reviewer": {
              "create": false,
              "delete": {
                 "own": true,
                 "any": false
              },
              "view": true,
              "edit": [
                 "*",
                 "!address"
              ]
           },
           "voter": {
              "create": true,
              "delete": false,
              "view": false,
              "edit": false
           }
        },
        "data": {
           "first": {
              "Address": "Quito",
              "Description": "Sample description",
              "CodeZip": 1234444
           },
           "second": {
              "Address": "Cuenca",
              "Description": "Sample description",
              "CodeZip": 266305
           }
        }
      }
     }
    }
  }
}
