Skip to content

Commit

Permalink
fix: load default lead/deal_owner
Browse files Browse the repository at this point in the history
  • Loading branch information
shariquerik committed Dec 11, 2023
1 parent 6a6081a commit 346310a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/Deals.vue
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ let newDeal = reactive({
status: 'Qualification',
email: '',
mobile_no: '',
deal_owner: getUser().email,
deal_owner: '',
})
const createDeal = createResource({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Leads.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ let newLead = reactive({
status: 'Open',
email: '',
mobile_no: '',
lead_owner: getUser().email,
lead_owner: '',
})
const createLead = createResource({
Expand Down
6 changes: 0 additions & 6 deletions frontend/src/stores/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ export const usersStore = defineStore('crm-users', () => {
function getUser(email) {
if (!email || email === 'sessionUser') {
email = session.user

if (email === 'Administrator' && users.data.length > 2) {
email = users.data.filter(
(user) => !['Administrator', 'Guest'].includes(user.name)
)[0].name
}
}
if (!usersByName[email]) {
users.reload()
Expand Down

0 comments on commit 346310a

Please sign in to comment.