fix: show edit button to manager

(cherry picked from commit 4a783fcba8241ec73f0def366830144a8e2c870d)
This commit is contained in:
Shariq Ansari 2025-07-14 14:22:53 +05:30 committed by Mergify
parent 1be736cb6f
commit 1b7e337176
2 changed files with 6 additions and 2 deletions

View File

@ -919,7 +919,7 @@ def get_deals_by_source(from_date="", to_date="", user=""):
to_date = frappe.utils.get_last_day(to_date or frappe.utils.nowdate()) to_date = frappe.utils.get_last_day(to_date or frappe.utils.nowdate())
if user: if user:
deal_conds += f" AND lead_owner = '{user}'" deal_conds += f" AND deal_owner = '{user}'"
result = frappe.db.sql( result = frappe.db.sql(
f""" f"""

View File

@ -14,7 +14,11 @@
<LucideRefreshCcw class="size-4" /> <LucideRefreshCcw class="size-4" />
</template> </template>
</Button> </Button>
<Button v-if="!editing" :label="__('Edit')" @click="editing = true"> <Button
v-if="!editing && (isManager() || isAdmin())"
:label="__('Edit')"
@click="editing = true"
>
<template #prefix> <template #prefix>
<LucidePenLine class="size-4" /> <LucidePenLine class="size-4" />
</template> </template>