/*
 * Author       : template
 * Generated on : 22-Nov-2009 22:37:12
 * Version      : 3.0
 */
application "Recruitment"
{
    type = public
    allow html = true
    date format = "dd-MMM-yyyy"
    time zone = "America/Los_Angeles"
    section Positions
    {
        list  Open_Positions
        {
            displayname = "Open Positions"
            show  all  rows  from  New_Position [Status == "Open"]
            (
                Position_Type as "Position Type"
                Position_Name as "Position Name"
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

        list  Closed_Positions
        {
            displayname = "Closed Positions"
            show  all  rows  from  New_Position 
            (
                Position_Type as "Position Type"
                Position_Name as "Position Name"
            )
            filters 
            (
                Position_Type
                "Closed Positions"  :  Status == "Close"
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

        form  New_Position
        {
            displayname  =  "New Position"
            
            must  have  Position_Name
            (
                displayname  =  "Position Name"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            must  have  Status
            (
                type  =  picklist
                values  =  {"New",   "Open",   "In process",   "Close"}
                sortorder  =  ascending
            )

            Position_Type
            (
                displayname  =  "Position Type"
                type  =  picklist
                values  =  {"Full time",   "Part time",   "Project work"}
                sortorder  =  ascending
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

    }

    section Applicants
    {
        list  All_Applicants
        {
            displayname = "All Applicants"
            show  all  rows  from  New_Applicant 
            (
                Applicant_Name as "Applicant Name"
                Email_ID as "Email ID"
                Education
                Experience
                Referred_By as "Referred By"
                Applied_For as "Applied For"
                Resume_Status as "Resume Status"
            )
            filters 
            (
                Education
                Experience
                Applied_For
                Resume_Status
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

        form  New_Applicant
        {
            displayname  =  "New Applicant"
            
            autogen_name
            (
                type  =  plaintext
                value = "aAbBcCspan style=aXbYcZtext-decoration: underline; font-weight: bold;aXbYcZxAyBzCApplicant Information:aAbBcC/spanxAyBzCaAbBcCbrxAyBzC\n"
            )

            must  have  Applicant_Name
            (
                displayname  =  "Applicant Name"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            must  have  Email_ID
            (
                displayname  =  "Email ID"
                type  =  email
                width  =  30
                maxchar  =  30
            )

            must  have  Education
            (
                type  =  picklist
                values  =  {"B.E",   "B.Tech",   "B.Sc",   "B.Com",   "B.A",   "M.A",   "M.S",   "M.Com",   "M.Sc",   "MBA",   "MCA",   "M.E",   "M.Tech",   "Diploma"}
                sortorder  =  ascending
            )

            Contact_Number
            (
                displayname  =  "Contact Number"
                type  =  text
                width  =  30
            )

            Experience
            (
                type  =  picklist
                values  =  {"Fresher",   "Experience 1yr",   "Experience 2+yrs",   "Experience 5+yrs",   "Experience 10+yrs"}
            )

            Date_of_Birth
            (
                displayname  =  "Date of Birth"
                type  =  date
            )

            Address
            (
                type  =  textarea
                width  =  4 , 27
            )

            autogen_name_1
            (
                type  =  plaintext
                value = "aAbBcCspan style=aXbYcZfont-weight: bold; text-decoration: underline;aXbYcZxAyBzCAdditional Information:aAbBcC/spanxAyBzCaAbBcCbrxAyBzC\n"
            )

            Referred_By
            (
                displayname  =  "Referred By"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            Applied_For
            (
                displayname  =  "Applied For"
                type  =  picklist
                values  =  New_Position.Position_Name
            )

            Hiring_Manager
            (
                displayname  =  "Hiring Manager"
                type  =  text
                width  =  30
                maxchar  =  30
            )

            Resume_Status
            (
                displayname  =  "Resume Status"
                type  =  picklist
                values  =  {"Call for Interview",   "Rejected",   "None"}
                sortorder  =  ascending
            )

            Interview_Status
            (
                displayname  =  "Interview Status"
                type  =  picklist
                values  =  {"Cleared",   "Not Cleared",   "None"}
                sortorder  =  ascending
            )

            actions
            {
                on add
                {
                    Submit
                    (
                        type  =  submit
                        displayname  =  "Submit"
                    )
                    Reset
                    (
                        type  =  reset
                        displayname  =  "Reset"
                    )
                }
                on edit
                {
                    Update
                    (
                        type  =  submit
                        displayname  =  "Update"
                    )
                    Cancel
                    (
                        type  =  cancel
                        displayname  =  "Cancel"
                    )
                }
            }
        }

    }

    section Candidates
    {
        list  Shortlisted_Candidates
        {
            displayname = "Shortlisted Candidates"
            show  all  rows  from  New_Applicant 
            (
                Email_ID as "Email ID"
                Applicant_Name as "Candidate Name"
                Experience
                Referred_By as "Referred By"
                Applied_For as "Applied For"
                Hiring_Manager as "Hiring Manager"
                Interview_Status as "Interview Status"
            )
            filters 
            (
                Education
                Experience
                Applied_For
                Interview_Status
                "Shortlisted"  :  Resume_Status == "Call for Interview"
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

    section Employees
    {
        list  Employees1
        {
            displayname = "Employees"
            show  all  rows  from  New_Applicant 
            (
                Experience
                Education
                Applicant_Name as "Employee Name"
                Hiring_Manager as "Project Manager"
            )
            filters 
            (
                Education
                Experience
                "Employees"  :  Interview_Status == "Cleared"
            )
            options
            (
                display rows = 100
            )
            permission
            (
                add = true
                edit = true
                delete = true
            )
        }

    }

}
