File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
IssueManagement/IssueCrud Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " javascript-crud-with-sampletasks" ,
3- "version" : " 1 .0" ,
3+ "version" : " 2.0 .0" ,
44 "homepage" : " https://mohamedrizwan399.github.io/CRUDJavaScriptSampleProject" ,
55 "private" : true ,
66 "dependencies" : {
1111 "axios" : " ^1.7.7" ,
1212 "cors" : " ^2.8.5" ,
1313 "firebase" : " ^11.0.1" ,
14- "gh-pages" : " ^6.2 .0" ,
14+ "gh-pages" : " ^6.3 .0" ,
1515 "jest" : " ^27.5.1" ,
1616 "jwt-decode" : " ^3.1.2" ,
1717 "nodemon" : " ^3.1.7" ,
Original file line number Diff line number Diff line change @@ -100,6 +100,11 @@ export const IssueCreationPage = () => {
100100 }
101101
102102 if ( insertbool ) {
103+ const isIdAlreadyExists = issues ?. find ( issue => issue ?. id === id ) ;
104+ if ( isIdAlreadyExists !== undefined && isIdAlreadyExists ?. id === id ) {
105+ alert ( "ID is already Exists. Check your created issues list to edit or create new issue using different Id." )
106+ return ;
107+ }
103108 setissues ( [ ...issues , issue ] ) ;
104109 } else {
105110 const editable = JSON . parse ( localStorage . getItem ( "issueData" ) ) ;
@@ -140,14 +145,8 @@ export const IssueCreationPage = () => {
140145 } < br > </ br > < br > </ br >
141146
142147 End date:   
143- < select id = "selectend" onChange = { ( e ) => setEndDate ( e . target . value ) } value = { enddate } >
144- < option > </ option >
145- < option > OCT 1</ option >
146- < option > OCT 2</ option >
147- < option > OCT 3</ option >
148- < option > OCT 3</ option >
149- < option > OCT 5</ option >
150- </ select >
148+ < input id = "selectend" type = "date" onChange = { ( e ) => setEndDate ( e . target . value ) } value = { enddate } />
149+
151150 { errorenddate ?
152151 < label > Select End Date for this issue*</ label > :""
153152 } < br > </ br > < br > </ br >
@@ -181,7 +180,7 @@ export const IssueCreationPage = () => {
181180 < option > </ option >
182181 < option > OPEN</ option >
183182 < option > INPROGRESS</ option >
184- < option > CLOSED</ option >
183+ { ! insertbool && < option > CLOSED</ option > }
185184 </ select >
186185 { errorstatus ?
187186 < label > Please select the status*</ label > :""
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class Demo extends React.Component{
3131 < div className = "othertask-container" >
3232 < div className = "instantChange-container" >
3333 Enter your Name: < input type = "text" onChange = { e => this . inputchange ( e , "name" ) } />
34- Enter your Age: < input type = "number " onChange = { e => this . inputchange ( e , "age" ) } />
34+ Enter your Age: < input type = "range" min = "1" max = "99 " onChange = { e => this . inputchange ( e , "age" ) } />
3535
3636 < h1 > Name: { name } < br /> Your Age: { age } </ h1 >
3737 </ div >
You can’t perform that action at this time.
0 commit comments