@@ -70,41 +70,66 @@ const Homepage = () => {
70
70
if ( contractType === "Employee" ) {
71
71
return (
72
72
< >
73
- < form onSubmit = { handleSubmit } className = "flex flex-col" >
74
- < label
75
- htmlFor = "position"
76
- className = " my-1 sm:my-2 md:my-4 md:text-xl"
77
- >
78
- Position
79
- </ label >
80
- < input
81
- type = "text"
82
- name = "position"
83
- className = "bg-slate-950 rounded-md border-2 border-stone-50 my-1 shadow-lg shadow-blue-950/50 hover:shadow-blue-950 sm:my-2 md:my-4 text-center sm:py-1 md:py-1.5 "
84
- />
85
- < label
86
- htmlFor = "organization"
87
- className = " my-1 sm:my-2 md:my-4 md:text-xl"
88
- >
89
- Organization
90
- </ label >
91
- < input
92
- type = "text"
93
- name = "organization"
94
- className = "bg-slate-950 rounded-md border-2 border-stone-50 my-1 shadow-lg shadow-blue-950/50 hover:shadow-blue-950 sm:my-2 md:my-4 text-center sm:py-1 md:py-1.5 "
95
- />
96
- < label
97
- htmlFor = "typeOfPosition"
98
- className = " my-1 sm:my-2 md:my-4 md:text-xl"
99
- >
100
- Type of Position
101
- </ label >
102
- < input
103
- type = "text"
73
+ < form
74
+ onSubmit = { handleSubmit }
75
+ className = "flex flex-col justify-evenly"
76
+ >
77
+ < div className = "flex flex-row mt-1 sm:mt-3 md:mt-4 justify-between" >
78
+ < label
79
+ htmlFor = "designation"
80
+ className = " mt-1 mb-0.5 sm:mt-2 sm:mb-1 md:mt-4 md:mb-2 md:text-xl"
81
+ >
82
+ Designation
83
+ </ label >
84
+ < input
85
+ type = "text"
86
+ name = "designation"
87
+ className = "bg-slate-950 rounded-md border-2 border-stone-50 mt-1 mb-0.5 sm:mt-2 sm:mb-1 md:mb-2 shadow-lg shadow-blue-950/50 hover:shadow-blue-950 text-center sm:py-1 "
88
+ />
89
+ </ div >
90
+ < div className = "flex flex-row mt-0.5 sm:mt-3 md:mt-2 justify-between" >
91
+ < label
92
+ htmlFor = "organization"
93
+ className = " mt-1 mb-0.5 sm:mt-2 sm:mb-1 md:mt-4 md:mb-2 md:text-xl"
94
+ >
95
+ Organization
96
+ </ label >
97
+ < input
98
+ type = "text"
99
+ name = "organization"
100
+ className = "bg-slate-950 rounded-md border-2 border-stone-50 mt-1 mb-0.5 sm:mt-2 sm:mb-1 md:mt-4 md:mb-2 shadow-lg shadow-blue-950/50 hover:shadow-blue-950 text-center sm:py-1 "
101
+ />
102
+ </ div >
103
+ { /* <div className=""> */ }
104
+ < select
105
+ className = "text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800 sm:my-2 md:my-3"
104
106
name = "typeOfPosition"
105
- className = "bg-slate-950 rounded-md border-2 border-stone-50 my-1 shadow-lg shadow-blue-950/50 hover:shadow-blue-950 sm:my-2 md:my-4 text-center sm:py-1 md:py-1.5 "
106
- />
107
- < div className = "text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" >
107
+ >
108
+ < option value = "none" selected disabled hidden >
109
+ Select a Type
110
+ </ option >
111
+ < option
112
+ value = "Corporate"
113
+ className = "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
114
+ >
115
+ Corporate
116
+ </ option >
117
+ < option
118
+ value = "RnD"
119
+ className = "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
120
+ >
121
+ RnD
122
+ </ option >
123
+ < option
124
+ value = "Government"
125
+ className = "block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white"
126
+ >
127
+ Government
128
+ </ option >
129
+ < option value = "Other" > Other</ option >
130
+ </ select >
131
+ { /* </div> */ }
132
+ < div className = "text-white bg-blue-700 hover:bg-blue-800 mt-0.5 sm:mt-3 md:mt-2 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center items-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" >
108
133
< input type = "submit" />
109
134
</ div >
110
135
</ form >
@@ -122,12 +147,12 @@ const Homepage = () => {
122
147
const handleSubmit = async ( e ) => {
123
148
e . preventDefault ( ) ;
124
149
setLoading ( true ) ;
125
- const position = e . target . position . value ;
150
+ const designation = e . target . designation . value ;
126
151
const organization = e . target . organization . value ;
127
152
const typeOfPosition = e . target . typeOfPosition . value ;
128
- console . log ( position , organization ) ;
153
+ console . log ( designation , organization ) ;
129
154
const response = await axios . post ( `${ backendUrl } /employee` , {
130
- position : position ,
155
+ designation : designation ,
131
156
organization : organization ,
132
157
typeOfPosition : typeOfPosition ,
133
158
} ) ;
@@ -148,8 +173,9 @@ const Homepage = () => {
148
173
< >
149
174
{ loading ? (
150
175
< >
151
- < div className = "bg-gray-950 min-h-screen max-w-full pt-4 flex flex-col md:flex-row justify-evenly items-center text-center text-white " >
176
+ < div className = "bg-gray-950 min-h-screen max-w-full pt-4 flex flex-col justify-evenly items-center text-center text-white " >
152
177
< img src = { Loader } alt = "" />
178
+ < h1 className = "text-2xl" > Generating, this may take a while</ h1 >
153
179
</ div >
154
180
</ >
155
181
) : (
@@ -165,7 +191,7 @@ const Homepage = () => {
165
191
alt = ""
166
192
/>
167
193
</ div >
168
- < div className = "homepage-right-container flex flex-col items-center " >
194
+ < div className = "homepage-right-container flex flex-col items-stretch " >
169
195
< h1 className = " text-xl sm:text-2xl md:text-4xl font-bold text-center text-white my-1 sm:my-2 md:my-4" >
170
196
GET YOUR CONTRACT
171
197
</ h1 >
0 commit comments