Merge pull request #166 from frappe/develop
chore: Merge develop to main
This commit is contained in:
commit
405b01e26b
@ -77,12 +77,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="m-2 flex flex-col gap-1">
|
<div class="m-2 flex flex-col gap-1">
|
||||||
<SidebarLink
|
|
||||||
label="Docs"
|
|
||||||
:isCollapsed="isSidebarCollapsed"
|
|
||||||
icon="book-open"
|
|
||||||
@click="() => openDocs()"
|
|
||||||
/>
|
|
||||||
<SidebarLink
|
<SidebarLink
|
||||||
:label="isSidebarCollapsed ? 'Expand' : 'Collapse'"
|
:label="isSidebarCollapsed ? 'Expand' : 'Collapse'"
|
||||||
:isCollapsed="isSidebarCollapsed"
|
:isCollapsed="isSidebarCollapsed"
|
||||||
@ -231,8 +225,4 @@ function getIcon(routeName) {
|
|||||||
return PinIcon
|
return PinIcon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDocs() {
|
|
||||||
window.open('https://docs.frappe.io/crm', '_blank')
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -207,7 +207,7 @@ const sections = computed(() => {
|
|||||||
label: 'Status',
|
label: 'Status',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: statusOptions('deal'),
|
options: dealStatuses.value,
|
||||||
prefix: getDealStatus(deal.status).iconColorClass,
|
prefix: getDealStatus(deal.status).iconColorClass,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -222,6 +222,14 @@ const sections = computed(() => {
|
|||||||
return fields
|
return fields
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const dealStatuses = computed(() => {
|
||||||
|
let statuses = statusOptions('deal')
|
||||||
|
if (!deal.status) {
|
||||||
|
deal.status = statuses[0].value
|
||||||
|
}
|
||||||
|
return statuses
|
||||||
|
})
|
||||||
|
|
||||||
function createDeal() {
|
function createDeal() {
|
||||||
createResource({
|
createResource({
|
||||||
url: 'crm.fcrm.doctype.crm_deal.crm_deal.create_deal',
|
url: 'crm.fcrm.doctype.crm_deal.crm_deal.create_deal',
|
||||||
|
|||||||
@ -12,7 +12,12 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #actions>
|
<template #actions>
|
||||||
<div class="flex flex-row-reverse gap-2">
|
<div class="flex flex-row-reverse gap-2">
|
||||||
<Button variant="solid" :label="__('Save')" @click="createNewLead" />
|
<Button
|
||||||
|
variant="solid"
|
||||||
|
:label="__('Create')"
|
||||||
|
:loading="isLeadCreating"
|
||||||
|
@click="createNewLead"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
@ -158,7 +163,7 @@ const sections = computed(() => {
|
|||||||
label: 'Status',
|
label: 'Status',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: statusOptions('lead'),
|
options: leadStatuses.value,
|
||||||
prefix: getLeadStatus(lead.status).iconColorClass,
|
prefix: getLeadStatus(lead.status).iconColorClass,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -185,6 +190,14 @@ const createLead = createResource({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const leadStatuses = computed(() => {
|
||||||
|
let statuses = statusOptions('lead')
|
||||||
|
if (!lead.status) {
|
||||||
|
lead.status = statuses[0].value
|
||||||
|
}
|
||||||
|
return statuses
|
||||||
|
})
|
||||||
|
|
||||||
function createNewLead() {
|
function createNewLead() {
|
||||||
createLead.submit(lead, {
|
createLead.submit(lead, {
|
||||||
validate() {
|
validate() {
|
||||||
|
|||||||
@ -67,14 +67,36 @@ const user = computed(() => getUser() || {})
|
|||||||
|
|
||||||
let dropdownOptions = ref([
|
let dropdownOptions = ref([
|
||||||
{
|
{
|
||||||
icon: 'corner-up-left',
|
group: 'Manage',
|
||||||
label: computed(() => __('Switch to Desk')),
|
hideLabel: true,
|
||||||
onClick: () => window.location.replace('/app'),
|
items: [
|
||||||
|
{
|
||||||
|
icon: 'corner-up-left',
|
||||||
|
label: computed(() => __('Switch to Desk')),
|
||||||
|
onClick: () => window.location.replace('/app'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'life-buoy',
|
||||||
|
label: computed(() => __('Support')),
|
||||||
|
onClick: () => window.open('https://t.me/frappecrm', '_blank'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: 'book-open',
|
||||||
|
label: computed(() => __('Docs')),
|
||||||
|
onClick: () => window.open('https://docs.frappe.io/crm', '_blank'),
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'log-out',
|
group: 'Logout',
|
||||||
label: computed(() => __('Log out')),
|
hideLabel: true,
|
||||||
onClick: () => logout.submit(),
|
items: [
|
||||||
|
{
|
||||||
|
icon: 'log-out',
|
||||||
|
label: computed(() => __('Log out')),
|
||||||
|
onClick: () => logout.submit(),
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -97,6 +97,7 @@ export const statusesStore = defineStore('crm-statuses', () => {
|
|||||||
for (const status in statusesByName) {
|
for (const status in statusesByName) {
|
||||||
options.push({
|
options.push({
|
||||||
label: statusesByName[status].name,
|
label: statusesByName[status].name,
|
||||||
|
value: statusesByName[status].name,
|
||||||
icon: () =>
|
icon: () =>
|
||||||
h(IndicatorIcon, {
|
h(IndicatorIcon, {
|
||||||
class: statusesByName[status].iconColorClass,
|
class: statusesByName[status].iconColorClass,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user