Ejemplo n.º 1
0
    def render(self):
        print()
        Colors().Cyan("-" * 44)
        print("{:^44}".format('Voyage'))
        Colors().Cyan("-" * 44)
        print()
        print("\t1: List Voyages")
        print("\t2: Add Voyage")
        print("\tQ: Quit")
        print()

        print("_" * 44)
        command = input("Enter a valid command: ").upper()
        print()
        if command == "1":
            os.system("cls" if os.name == "nt" else "clear")
            UISubListVoyageMenu()

        elif command == "2":
            os.system("cls" if os.name == "nt" else "clear")
            UISubAddVoyageMenu()

        elif command == "Q":
            return

        else:
            print("invalid command")
Ejemplo n.º 2
0
    def render(self):
        print()
        Colors().Cyan("-" * 44)
        print("{:^44}".format('Aircrafts'))
        Colors().Cyan("-" * 44)
        print()
        print("\t1: List Aircrafts")  #
        print("\t2: Add new Aircraft")
        print("\tQ: Quit")
        print()

        print("_" * 44)
        command = input("Enter a valid command: ").upper()
        print()
        if command == "1":
            nextUI = UI_Aircraft()
            nextUI.listAircraftTypes()

        elif command == "2":
            nextUI = UI_Aircraft()
            nextUI.setAircraftTypes()

        elif command == "Q":
            return

        else:
            print("invalid command")
Ejemplo n.º 3
0
    def render(self):
        print()
        Colors().Cyan("-" * 44)
        print("{:^44}".format('Add Voyage'))
        Colors().Cyan("-" * 44)
        print()
        print("\t1: Add new Voyage")
        print("\t2: Add crew to Voyage")
        print("\tQ: Quit")
        print()

        print("_" * 44)
        command = input("Enter a valid command: ").upper()
        print()

        if command == "1":
            nextUI = UI_Voyage()
            nextUI.create_voyage()

        elif command == "2":
            nextUI = UI_Voyage()
            nextUI.add_crew_to_voyage()

        elif command == "Q":
            return

        else:
            print("invalid command")
Ejemplo n.º 4
0
    def render(self):
        print()
        Colors().Cyan("-" * 44)
        print("{:^44}".format('Add new employee'))
        Colors().Cyan("-" * 44)
        print()
        print("\t1: Add new Cabin Crew member")
        print("\t2: Add new Pilot")
        print("\tQ: Quit")
        print()

        print("_" * 44)
        command = input("Enter a valid command: ").upper()
        print()

        if command == "1":
            nextUI = UI_Employee()
            nextUI.SetCabinCrew()

        elif command == "2":
            nextUI = UI_Employee()
            nextUI.SetPilot()

        elif command == "Q":
            return

        else:
            print("invalid command")
Ejemplo n.º 5
0
    def render(self):
        print()
        Colors().Cyan("-" * 44)
        print("{:^44}".format('List Voyages'))
        Colors().Cyan("-" * 44)
        print()
        print("\t1: All Voyages")
        print("\t2: Voyages on specific date")
        print("\t3: Voyages on specific week")
        print("\tQ: Quit")
        print()

        print("_" * 44)
        command = input("Enter a valid command: ").upper()
        print()
        if command == "1":
            nextUI = UI_Voyage()
            nextUI.listVoyage()

        elif command == "2":
            nextUI = UI_Voyage()
            nextUI.listByDateFilter()

        elif command == "3":
            nextUI = UI_Voyage()
            nextUI.listByWeekFilter()

        elif command == "Q":
            return

        else:
            print("invalid command")
Ejemplo n.º 6
0
    def render(self):
        print()
        Colors().Cyan("-"*44)
        print("{:^44}".format('Employees'))
        Colors().Cyan("-"*44)
        print()
        print("\t1: List employees") #
        print("\t2: Add new employee") #
        print("\t3: Update employee")
        print("\tQ: Quit")
        print()

        print("_"*44)
        command = input("Enter a valid command: ").upper()
        print()
        if command == "1":
            os.system("cls" if os.name == "nt" else "clear")
            UISubListEmployeeMenu()

        elif command == "2":
            os.system("cls" if os.name == "nt" else "clear")
            UISubAddEmployeeMenu()

        elif command == "3":
            os.system("cls" if os.name == "nt" else "clear")
            nextUI = UI_Employee()
            nextUI.changeEmployeeInfo()
    
        elif command == "Q":
            return
            
        else:
            print("invalid command")
Ejemplo n.º 7
0
    def render(self):
        while True:
            print()
            Colors().Cyan("_" * 44)
            print()
            print('{:^34}'.format("WELCOME TO NaN AIR"))
            print('{:>37}'.format('the undefined breeze'))
            print()
            Colors().Cyan("-" * 44)
            print("{:^44}".format('Main menu'))
            Colors().Cyan("-" * 44)
            print()
            print("\t1: Employee")
            print("\t2: Voyage")
            print("\t3: Aircrafts")
            print("\t4: Destinations")
            print("\tQ: Quit")
            print()

            print("_" * 44)
            command = input("Enter a valid command: ").upper()
            print()
            if command == "1":
                os.system("cls" if os.name == "nt" else "clear")
                UISubEmployeeMenu()

            elif command == "2":
                os.system("cls" if os.name == "nt" else "clear")
                UISubVoyageMenu()

            elif command == "3":
                os.system("cls" if os.name == "nt" else "clear")
                UISubAircraftsMenu()

            elif command == "4":
                os.system("cls" if os.name == "nt" else "clear")
                UISubDestinationMenu()

            elif command == 'Q':
                break

            else:
                print("invalid command")
    def render(self):
        print()
        Colors().Cyan("-"*44)
        print("{:^44}".format('Destinations'))
        Colors().Cyan("-"*44)
        print()
        print("\t1: List Destinations") #
        print("\t2: Update emergency contact ")
        print("\t3: Update emergency phone number")
        print("\t4: Add new Destination")
        print("\tQ: Quit")
        print()
        
        print("_"*44)
        command = input("Enter a valid command: ").upper()
        print()
        if command == "1":
            nextUI = UI_Destination()
            nextUI.listDestinations()

        elif command == "2":
            nextUI = UI_Destination()
            nextUI.changeDestinationContact()

        elif command == "3":
            nextUI = UI_Destination()
            nextUI.changeDestinationPhone()

        elif command == "4":
            nextUI = UI_Destination()
            nextUI.SetDestination()
        
        elif command == "Q":
            return

        else:
            print("invalid command")
    def render(self):
        print()
        Colors().Cyan("-" * 44)
        print("{:^44}".format('List Employees'))
        Colors().Cyan("-" * 44)
        print()
        print("\t1: Employees")
        print("\t2: Pilots")
        print("\t3: Cabincrew")
        print("\t4: Pilots by license")
        print("\t5: Pilots by aircrafts")
        print("\t6: Information on employee")
        print("\t7: Weeklist of voyages for employee")
        print("\t8: Employees working on a specific day")
        print("\t9: Employees not working on a specific day")
        print("\tQ: Quit")
        print()

        print("_" * 44)
        command = input("Enter a valid command: ").upper()
        print()
        if command == "1":
            nextUI = UI_Employee()
            nextUI.listEmployee()

        elif command == "2":
            nextUI = UI_Employee()
            nextUI.listPilots()

        elif command == "3":
            nextUI = UI_Employee()
            nextUI.listCabinCrew()

        elif command == "4":
            nextUI = UI_Employee()
            nextUI.listByLicense()

        elif command == "5":
            nextUI = UI_Employee()
            nextUI.list_pilots_for_planetypeID()

        elif command == "6":
            nextUI = UI_Employee()
            nextUI.listByName()

        elif command == '7':
            nextUI = UI_Employee()
            nextUI.listEmployeesVoyagesInSpecificWeek()

        elif command == '8':
            nextUI = UI_Employee()
            nextUI.listAllEmployeesWorkingOnSpecificDay()

        elif command == "9":
            nextUI = UI_Employee()
            nextUI.listAllEmployeesNotWorkingOnSpecificDay()

        elif command == "Q":
            return

        else:
            print("invalid command")