|  | 
|  | 1 | +<div class="min-h-screen bg-gray-50 py-8 px-4 sm:px-6 lg:px-8"> | 
|  | 2 | +  <div class="max-w-2xl mx-auto"> | 
|  | 3 | +    <div class="bg-white shadow-lg rounded-lg px-8 py-10"> | 
|  | 4 | +      <div class="text-center mb-8"> | 
|  | 5 | +        <h1 class="text-3xl font-bold text-gray-900 mb-2">Add a New Event</h1> | 
|  | 6 | +        <p class="text-gray-600">Create an exciting event for the community</p> | 
|  | 7 | +      </div> | 
|  | 8 | + | 
|  | 9 | +      <form [formGroup]="eventForm" (ngSubmit)="onSubmit()" class="space-y-6"> | 
|  | 10 | +        <!-- Conference Selection --> | 
|  | 11 | +        <div> | 
|  | 12 | +          <label | 
|  | 13 | +            for="conference" | 
|  | 14 | +            class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 15 | +          > | 
|  | 16 | +            Conference <span class="text-red-500">*</span> | 
|  | 17 | +          </label> | 
|  | 18 | +          <select | 
|  | 19 | +            formControlName="conference" | 
|  | 20 | +            id="conference" | 
|  | 21 | +            class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 bg-white" | 
|  | 22 | +          > | 
|  | 23 | +            <option value="" disabled selected>Select Conference</option> | 
|  | 24 | +            @for(conf of conferences; track conf.id) { | 
|  | 25 | +            <option [value]="conf.id">{{ conf.name }}</option> | 
|  | 26 | +            } | 
|  | 27 | +          </select> | 
|  | 28 | +        </div> | 
|  | 29 | + | 
|  | 30 | +        <!-- Event Name --> | 
|  | 31 | +        <div> | 
|  | 32 | +          <label | 
|  | 33 | +            for="eventName" | 
|  | 34 | +            class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 35 | +          > | 
|  | 36 | +            Event Name <span class="text-red-500">*</span> | 
|  | 37 | +          </label> | 
|  | 38 | +          <input | 
|  | 39 | +            id="eventName" | 
|  | 40 | +            formControlName="name" | 
|  | 41 | +            type="text" | 
|  | 42 | +            placeholder="Enter event name" | 
|  | 43 | +            class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200" | 
|  | 44 | +          /> | 
|  | 45 | +        </div> | 
|  | 46 | + | 
|  | 47 | +        <!-- Event Location --> | 
|  | 48 | +        <div> | 
|  | 49 | +          <label | 
|  | 50 | +            for="eventLocation" | 
|  | 51 | +            class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 52 | +          > | 
|  | 53 | +            Event Location <span class="text-red-500">*</span> | 
|  | 54 | +          </label> | 
|  | 55 | +          <input | 
|  | 56 | +            id="eventLocation" | 
|  | 57 | +            formControlName="location" | 
|  | 58 | +            type="text" | 
|  | 59 | +            placeholder="Enter event location" | 
|  | 60 | +            class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200" | 
|  | 61 | +          /> | 
|  | 62 | +        </div> | 
|  | 63 | + | 
|  | 64 | +        <!-- Event Description --> | 
|  | 65 | +        <div> | 
|  | 66 | +          <label | 
|  | 67 | +            for="eventDescription" | 
|  | 68 | +            class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 69 | +          > | 
|  | 70 | +            Event Description | 
|  | 71 | +          </label> | 
|  | 72 | +          <textarea | 
|  | 73 | +            id="eventDescription" | 
|  | 74 | +            formControlName="description" | 
|  | 75 | +            rows="4" | 
|  | 76 | +            placeholder="Describe your event..." | 
|  | 77 | +            class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200 resize-vertical" | 
|  | 78 | +          ></textarea> | 
|  | 79 | +        </div> | 
|  | 80 | + | 
|  | 81 | +        <!-- Date and Time Row --> | 
|  | 82 | +        <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> | 
|  | 83 | +          <!-- Event Date --> | 
|  | 84 | +          <div> | 
|  | 85 | +            <label | 
|  | 86 | +              for="eventDate" | 
|  | 87 | +              class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 88 | +            > | 
|  | 89 | +              Event Date <span class="text-red-500">*</span> | 
|  | 90 | +            </label> | 
|  | 91 | +            <input | 
|  | 92 | +              id="eventDate" | 
|  | 93 | +              formControlName="date" | 
|  | 94 | +              type="date" | 
|  | 95 | +              class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200" | 
|  | 96 | +            /> | 
|  | 97 | +          </div> | 
|  | 98 | + | 
|  | 99 | +          <!-- Event Time --> | 
|  | 100 | +          <div> | 
|  | 101 | +            <label | 
|  | 102 | +              for="eventTime" | 
|  | 103 | +              class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 104 | +            > | 
|  | 105 | +              Event Time <span class="text-red-500">*</span> | 
|  | 106 | +            </label> | 
|  | 107 | +            <input | 
|  | 108 | +              id="eventTime" | 
|  | 109 | +              formControlName="time" | 
|  | 110 | +              type="time" | 
|  | 111 | +              class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200" | 
|  | 112 | +            /> | 
|  | 113 | +          </div> | 
|  | 114 | +        </div> | 
|  | 115 | + | 
|  | 116 | +        <!-- Event Capacity --> | 
|  | 117 | +        <div> | 
|  | 118 | +          <label | 
|  | 119 | +            for="eventCapacity" | 
|  | 120 | +            class="block text-sm font-medium text-gray-700 mb-2" | 
|  | 121 | +          > | 
|  | 122 | +            Event Capacity | 
|  | 123 | +          </label> | 
|  | 124 | +          <input | 
|  | 125 | +            id="eventCapacity" | 
|  | 126 | +            formControlName="capacity" | 
|  | 127 | +            type="number" | 
|  | 128 | +            min="1" | 
|  | 129 | +            placeholder="Maximum number of participants" | 
|  | 130 | +            class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors duration-200" | 
|  | 131 | +          /> | 
|  | 132 | +        </div> | 
|  | 133 | + | 
|  | 134 | +        <!-- Submit Button --> | 
|  | 135 | +        <div class="pt-6"> | 
|  | 136 | +          <button | 
|  | 137 | +            type="submit" | 
|  | 138 | +            class="w-full bg-gradient-to-r from-blue-600 to-purple-600 hover:from-blue-700 hover:to-purple-700 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-200 transform hover:scale-105 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 shadow-lg" | 
|  | 139 | +          > | 
|  | 140 | +            <span class="flex items-center justify-center"> | 
|  | 141 | +              <svg | 
|  | 142 | +                class="w-5 h-5 mr-2" | 
|  | 143 | +                fill="none" | 
|  | 144 | +                stroke="currentColor" | 
|  | 145 | +                viewBox="0 0 24 24" | 
|  | 146 | +              > | 
|  | 147 | +                <path | 
|  | 148 | +                  stroke-linecap="round" | 
|  | 149 | +                  stroke-linejoin="round" | 
|  | 150 | +                  stroke-width="2" | 
|  | 151 | +                  d="M12 6v6m0 0v6m0-6h6m-6 0H6" | 
|  | 152 | +                ></path> | 
|  | 153 | +              </svg> | 
|  | 154 | +              Create Event | 
|  | 155 | +            </span> | 
|  | 156 | +          </button> | 
|  | 157 | +        </div> | 
|  | 158 | +      </form> | 
|  | 159 | +    </div> | 
|  | 160 | +  </div> | 
|  | 161 | +</div> | 
0 commit comments