Skip to content

Commit 0a2aaed

Browse files
committed
intuitive team template download procedure
1 parent ab5bfc3 commit 0a2aaed

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/components/BulkRatingModal.tsx

+13-9
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ const BulkRatingModal = ({ bulkRateModal, setBulkRateModal }: BulkRatingModalPro
144144
<hr className="w-full my-3 border-b bg-primary" />
145145
</div>
146146
<div>
147-
<form data-testid="bulk-rating-form" className="flex flex-col gap-5" onSubmit={saveRatings}>
148-
<div className="flex flex-col gap-1">
147+
<form data-testid="bulk-rating-form" className="flex flex-col gap-2" onSubmit={saveRatings}>
148+
<div className="flex flex-col">
149149
<label>Choose a cohort</label>
150-
<select data-testid="select-cohort" className="p-2 text-black dark:text-white rounded-lg bg-white dark:bg-dark border-2 border-primary"
150+
<select data-testid="select-cohort" className="p-2 my-2 text-sm text-black dark:text-white rounded-lg bg-white dark:bg-dark border-2 border-primary"
151151
defaultValue={""}
152152
onChange={selectCohort}
153153
>
@@ -170,7 +170,7 @@ const BulkRatingModal = ({ bulkRateModal, setBulkRateModal }: BulkRatingModalPro
170170
}
171171
</select>
172172
<label>Choose a sprint</label>
173-
<select data-testid="select-sprint" className="p-2 text-black dark:text-white rounded-lg bg-white dark:bg-dark border-2 border-primary"
173+
<select data-testid="select-sprint" className="p-2 my-2 text-sm text-black dark:text-white rounded-lg bg-white dark:bg-dark border-2 border-primary"
174174
defaultValue={""}
175175
onChange={(e) => {
176176
e.preventDefault()
@@ -207,10 +207,11 @@ const BulkRatingModal = ({ bulkRateModal, setBulkRateModal }: BulkRatingModalPro
207207
}
208208
</select>
209209
</div>
210-
<div className="flex items-center justify-between">
210+
<div>
211+
<label>Upload a rating file (.xlsx or .xlx):</label>
211212
<input
212213
data-testid="file-input"
213-
className="w-1/2 h-full bg-gray-600 rounded-md"
214+
className="w-full mt-2 mb-5 bg-gray-600 rounded-md"
214215
type="file"
215216
ref={fileUploadRef}
216217
onChange={(e) => {
@@ -220,8 +221,10 @@ const BulkRatingModal = ({ bulkRateModal, setBulkRateModal }: BulkRatingModalPro
220221
accept=".xlsx, .xls"
221222
>
222223
</input>
223-
<div className="flex gap-2">
224-
<select data-testid="select-team" className="p-2 text-sm text-black dark:text-white rounded-lg bg-white dark:bg-dark border-2 border-primary" defaultValue={""} onChange={(e)=>setSelectedTeam(e.target.value)}>
224+
<div className="flex flex-col gap-3 p-3 rounded-md text-sm bg-neutral-700">
225+
<p className="">Would you like to download team template for easier rating?</p>
226+
<div className="flex gap-2">
227+
<select data-testid="select-team" className="p-1 text-sm text-black dark:text-white rounded-lg bg-white dark:bg-dark border-2 border-primary" defaultValue={""} onChange={(e)=>setSelectedTeam(e.target.value)}>
225228
<option data-testid="team-default-option">Choose a team</option>
226229
{
227230
teams && teams.getTeamsByCohort.length > 0 ?
@@ -239,7 +242,8 @@ const BulkRatingModal = ({ bulkRateModal, setBulkRateModal }: BulkRatingModalPro
239242
: ''
240243
}
241244
</select>
242-
<button data-testid="download-button" type="button" onClick={downloadTeamFile} className="p-3 text-white rounded-lg bg-green-500 text-sm font-serif font-semibold">Download</button>
245+
<button data-testid="download-button" type="button" onClick={downloadTeamFile} className="py-1 px-2 text-white rounded-lg bg-green-700 text-sm font-serif font-semibold">Download</button>
246+
</div>
243247
</div>
244248
</div>
245249

0 commit comments

Comments
 (0)