Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update: added confirmation when a salary les than 10000 is entered #344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
11 changes: 8 additions & 3 deletions frontend/pages/add_salary.vue
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,14 @@ export default {
behavior: 'smooth',
block: 'center',
})
} else {
this.$store.dispatch('postRating', this.newRating)
this.$router.push('/')
}else if(this.newRating.salary < 10000){
if(confirm("Are you sure of the amount of salary you have entered? ")){
this.$store.dispatch('postRating', this.newRating)
this.$router.push('/')
}
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but make sure to have a confirmation from a frontend here like @Asam237 !
Also, it could be great to have those lines formatted maybe 🤔 ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I will contact @Asam237 for confirmation.
For the code formatting will format it.

this.$store.dispatch('postRating', this.newRating)
this.$router.push('/')
}
}
},
Expand Down