התקדמות שלך
47/47

ג'אווה סקריפט המדריך המלא 2024
בניית אפליקציות הזמנת כרטיסים לסרט


בפרוייקט הבא נלמד איך לבנות אפליקציה להזמנת כרטיסים לסרט, נלמד איך להציג סרטים שונים למשתמש, ונבנה עמוד בחירת כיסאות בידיוק כמו שאנחנו מזמינים כרטיסים לסרט בסינימה סיטי.

עמוד בחירת סרט
עמוד בחירת כיסאות
  • we are going to write a movie tickets ordering application.
  • clone this JSON file that contains a list of movies and create a simple tickets order application.
  • you will see that there are no seats at all for any movie, you will have to randomly generate rows and seats for each movie, you can decide for instance that a theater for certain movie has just 3 rows and each has 10 seats in it. or you can create a function that fill it up randomly using min max values.
  • make sure that when the application loads you check if you already generate rows and seats, you dont want to keep regenerate the rows and the seats whenever user is refreshing the page.
  • you will have to populate the rows array with objects, each object should look like this
                    
    {
        rowNumber: 0,
        seats: [
          {
            seatNumber: 0,
            isSelected: false,
            isOccupied: false
          }
        ]
    }
                    
                
  • In the landing page make a render function that render all movies, also as bonus you can add a filter that show adult and kids movie separately
  • when you click on order tickets on certain movie it will take you to the seat selection page for this movie
  • allow the user select seats that are not already ordered
  • paint "already ordered seats" in yellow
  • allow the user to finish his order and take him back to the main landing page
  • make sure to save everything to localStorage so in the next visit to the same movie we will see that the seats we ordered are no longer available .
שאלות
דברו איתי
whatsapp
ווצאפwhatsapp דיסקורדwhatsapp