Exemplo n.º 1
0
def page_admin_decline(shelter, admin):
    """Page to remove a pet from the drop off directory
    """
    print('Please enter the ID of the Pet you wish to decline.')
    id = helper.get_input_ID(shelter.pet_drop_directory)
    shelter.remove_Pet(id, shelter.pet_drop_directory)
    print('Pet {} has been declined.'.format(id))
    time.sleep(3)
    page_admin_home(shelter, admin)
Exemplo n.º 2
0
def page_admin_accept(shelter, admin):
    """Page to move a Pet from the drop off directory and add to the pet directory
    """
    print('Please enter the ID of the Pet you wish to accept.')
    id = helper.get_input_ID(shelter.pet_drop_directory)
    shelter.add_Pet(shelter.get_Pet(id, shelter.pet_drop_directory),
                    shelter.pet_directory)
    shelter.remove_Pet(id, shelter.pet_drop_directory)
    print('Pet {} has been accepted to the pet directory.'.format(id))
    time.sleep(3)
    page_admin_home(shelter, admin)
Exemplo n.º 3
0
    def declinePet(shelter):
        """Remove a Pet from the drop off directory

                Args:
                    shelter(Shelter): shelter currently being managed
        """
        print('Please enter the ID of the Pet you wish to decline.')
        id = helper.get_input_ID(shelter.pet_drop_directory)
        shelter.remove_Pet(id, shelter.pet_drop_directory)
        print('Pet {} has been declined.'.format(id))
        time.sleep(3)
        return
Exemplo n.º 4
0
    def acceptPet(shelter):
        """Move a Pet from the drop off directory and add to the pet directory

                Args:
                    shelter(Shelter): shelter currently being managed
        """
        print('Please enter the ID of the Pet you wish to accept.')
        id = helper.get_input_ID(shelter.pet_drop_directory)
        shelter.add_Pet(shelter.get_Pet(id, shelter.pet_drop_directory),
                        shelter.pet_directory)
        shelter.remove_Pet(id, shelter.pet_drop_directory)
        print('Pet {} has been accepted to the pet directory.'.format(id))
        time.sleep(3)
        return
Exemplo n.º 5
0
def page_pets_visit(shelter):
    """Page to schedule a visit with a Pet - update the status. User inputs Pet ID to update
    """
    print('Please enter the pet ID you wish to visit. [0 to exit]')

    id = helper.get_input_ID(shelter.pet_directory)

    if id == 0:
        page_home(shelter)
    else:
        print('Thank you for scheduling a visit with {}, we{}ll see you soon!'.
              format((shelter.get_Pet(id, shelter.pet_directory)).name, "'"))
        shelter.update_Pet_Status(id, 'On Hold')
        time.sleep(3)
        page_home(shelter)
Exemplo n.º 6
0
def page_pets_adopt(shelter):
    """Page to adopt a pet - update the status. User inputs Pet ID to update
    """
    print('Please enter the pet ID you wish to adopt. [0 to exit]')

    id = helper.get_input_ID(shelter.pet_directory)

    if id == 0:
        page_home(shelter)
    else:
        print('Thank you for adopting {}, they can'
              't wait to see you!'.format(
                  (shelter.get_Pet(id, shelter.pet_directory)).name))
        shelter.update_Pet_Status(id, 'Adopted')
        time.sleep(3)
        page_home(shelter)
Exemplo n.º 7
0
    def petAdopt(shelter):
        """Adopt a pet(Set status to Adopted). User inputs Pet ID to update

                Args:
                    shelter(Shelter): current shelter being managed
        """
        print('Please enter the pet ID you wish to adopt. [0 to exit]')

        id = helper.get_input_ID(shelter.pet_directory)

        if id == 0:
            return (0)
        else:
            print('Thank you for adopting {}, they can'
                  't wait to see you!'.format(
                      (shelter.get_Pet(id, shelter.pet_directory)).name))
            shelter.update_Pet_Status(id, 'Adopted')
            time.sleep(3)
            return
Exemplo n.º 8
0
    def petVisit(shelter):
        """Schedule a visit with a Pet(Set status to On-Hold). User inputs Pet ID to update

                Args:
                    shelter(Shelter): current shelter being managed
        """
        print('Please enter the pet ID you wish to visit. [0 to exit]')

        id = helper.get_input_ID(shelter.pet_directory)

        if id == 0:
            return (0)
        else:
            print(
                'Thank you for scheduling a visit with {}, we{}ll see you soon!'
                .format((shelter.get_Pet(id, shelter.pet_directory)).name,
                        "'"))
            shelter.update_Pet_Status(id, 'On Hold')
            time.sleep(3)
            return