-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from rkshaon/shaon
frontend, backend
- Loading branch information
Showing
20 changed files
with
289 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div>Accounting Page</div> | ||
<div class="container mt-5">Accounting Page</div> | ||
</template> | ||
|
||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div>Customer Page</div> | ||
<div class="container mt-5">Customer Page</div> | ||
</template> | ||
|
||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div>Dashboard Page</div> | ||
<div class="container mt-5">Dashboard Page</div> | ||
</template> | ||
|
||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template> | ||
<div>Inventory Page</div> | ||
<div class="container mt-5">Inventory Page</div> | ||
</template> | ||
|
||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
<template> | ||
<div>Order Page</div> | ||
<div class="container mt-5"> | ||
Order Page | ||
</div> | ||
</template> | ||
|
||
<script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
85 changes: 85 additions & 0 deletions
85
frontend/src/components/admin/user/AdminChangePasswordModal.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<template> | ||
<div class="modal fade" id="changePasswordModal" tabindex="-1" aria-labelledby="changePasswordModalLabel" | ||
aria-hidden="true" ref="changePasswordModal"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title" id="changePasswordModalLabel">Change Password</h5> | ||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> | ||
</div> | ||
<div class="modal-body text-start"> | ||
<form action=""> | ||
<div class="mb-3"> | ||
<label for="exampleInputText2" class="form-label">Current Password</label> | ||
<input type="text" class="form-control" id="exampleInputText2" | ||
v-model="changePasswordData.currentPassword"> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="exampleInputText2" class="form-label">New Password</label> | ||
<input type="text" class="form-control" id="exampleInputText2" | ||
v-model="changePasswordData.newPassword"> | ||
</div> | ||
<div class="mb-3"> | ||
<label for="exampleInputText2" class="form-label">Confirm Password</label> | ||
<input type="text" class="form-control" id="exampleInputText2" | ||
v-model="changePasswordData.confirmPassword"> | ||
</div> | ||
</form> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button> | ||
<button type="button" class="btn btn-primary" @click="confirmUpdate">Save | ||
changes</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { API_BASE_URL } from '@/config'; | ||
import { Modal } from 'bootstrap'; | ||
import { useToast } from 'vue-toastification'; | ||
export default { | ||
name: 'AdminChangePasswordModal.vue', | ||
components: { | ||
}, | ||
props: { | ||
}, | ||
data() { | ||
return { | ||
API_BASE_URL: API_BASE_URL, | ||
changePasswordData: { | ||
currentPassword: '', | ||
newPassword: '', | ||
confirmPassword: '', | ||
} | ||
} | ||
}, | ||
methods: { | ||
async showChangePasswordModal() { | ||
const modalElement = this.$refs.changePasswordModal; | ||
if (modalElement) { | ||
const modal = new Modal(modalElement); | ||
modal.show(); | ||
} else { | ||
const toast = useToast(); | ||
toast.error("404"); | ||
console.log('404'); | ||
} | ||
}, | ||
async confirmUpdate() { | ||
console.log('Confirm update function called.'); | ||
const toast = useToast(); | ||
toast.info("work in progress"); | ||
const modalElement = this.$refs.changePasswordModal; | ||
const modal = new Modal(modalElement); | ||
modal._hideModal(); | ||
}, | ||
} | ||
} | ||
</script> |
38 changes: 38 additions & 0 deletions
38
frontend/src/components/admin/user/AdminProfileCardComponent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<template> | ||
<div class="card"> | ||
<img v-if="profileData.picture" :src="`${API_BASE_URL}${profileData.picture}`" :alt="profileData.name" | ||
class="card-img-top" height="250" width="250" /> | ||
<img v-else src="@/assets/loading.gif" alt="Static Photo" class="card-img-top" height="250" width="250"> | ||
<h5 class="card-title">{{ profileData.name }}</h5> | ||
<h6 class="card-title">{{ profileData.role }}</h6> | ||
<div class="card-body"> | ||
<p class="card-text"> | ||
<font-awesome-icon :icon="['fas', 'envelope']" size="lg" /> | ||
{{ profileData.email }} | ||
</p> | ||
<p class="card-text"> | ||
<font-awesome-icon :icon="['fas', 'envelope']" size="lg" /> | ||
{{ profileData.username }} | ||
</p> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { API_BASE_URL } from '@/config'; | ||
export default { | ||
name: 'AdminProfileCardComponent', | ||
props: { | ||
profileData: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
data() { | ||
return { | ||
API_BASE_URL: API_BASE_URL, | ||
} | ||
}, | ||
} | ||
</script> |
Oops, something went wrong.