Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "javascript-crud-with-sampletasks",
"version": "1.0",
"version": "2.0.0",
"homepage": "https://mohamedrizwan399.github.io/CRUDJavaScriptSampleProject",
"private": true,
"dependencies": {
Expand All @@ -11,7 +11,7 @@
"axios": "^1.7.7",
"cors": "^2.8.5",
"firebase": "^11.0.1",
"gh-pages": "^6.2.0",
"gh-pages": "^6.3.0",
"jest": "^27.5.1",
"jwt-decode": "^3.1.2",
"nodemon": "^3.1.7",
Expand Down
17 changes: 8 additions & 9 deletions src/IssueManagement/IssueCrud/IssueCreationPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ export const IssueCreationPage = () => {
}

if (insertbool) {
const isIdAlreadyExists = issues?.find(issue => issue?.id === id);
if(isIdAlreadyExists !== undefined && isIdAlreadyExists?.id === id) {
alert("ID is already Exists. Check your created issues list to edit or create new issue using different Id.")
return;
}
setissues([...issues, issue]);
} else {
const editable = JSON.parse(localStorage.getItem("issueData"));
Expand Down Expand Up @@ -140,14 +145,8 @@ export const IssueCreationPage = () => {
}<br></br><br></br>

End date:&emsp;&emsp;&emsp;
<select id="selectend" onChange={(e)=>setEndDate(e.target.value)} value={enddate}>
<option></option>
<option>OCT 1</option>
<option>OCT 2</option>
<option>OCT 3</option>
<option>OCT 3</option>
<option>OCT 5</option>
</select>
<input id="selectend" type="date" onChange={(e)=>setEndDate(e.target.value)} value={enddate}/>

{errorenddate?
<label>Select End Date for this issue*</label>:""
}<br></br><br></br>
Expand Down Expand Up @@ -181,7 +180,7 @@ export const IssueCreationPage = () => {
<option></option>
<option>OPEN</option>
<option>INPROGRESS</option>
<option>CLOSED</option>
{!insertbool && <option>CLOSED</option>}
</select>
{errorstatus?
<label>Please select the status*</label>:""
Expand Down
2 changes: 1 addition & 1 deletion src/homePage/Demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Demo extends React.Component{
<div className="othertask-container">
<div className="instantChange-container">
Enter your Name: <input type="text" onChange={e => this.inputchange(e, "name")} />
Enter your Age: <input type="number" onChange={e => this.inputchange(e, "age")} />
Enter your Age: <input type="range" min="1" max="99" onChange={e => this.inputchange(e, "age")} />

<h1>Name: {name}<br/> Your Age: {age}</h1>
</div>
Expand Down