mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 13:09:17 +00:00
website: made order and ticket listing
This commit is contained in:
@@ -73,8 +73,25 @@ def set_status(name, status):
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_tickets():
|
||||
tickets = webnotes.conn.sql("""select name, subject, status from
|
||||
`tabSupport Ticket` where raised_by=%s order by modified desc""",
|
||||
tickets = webnotes.conn.sql("""select
|
||||
name, subject, status
|
||||
from `tabSupport Ticket`
|
||||
where raised_by=%s
|
||||
order by modified desc
|
||||
limit 20""",
|
||||
webnotes.session.user, as_dict=1)
|
||||
return tickets
|
||||
|
||||
def get_website_args():
|
||||
bean = webnotes.bean("Support Ticket", webnotes.form_dict.name)
|
||||
if bean.doc.raised_by != webnotes.session.user:
|
||||
return {
|
||||
"doc": {"name": "Not Allowed"}
|
||||
}
|
||||
else:
|
||||
return {
|
||||
"doc": bean.doc,
|
||||
"doclist": bean.doclist,
|
||||
"webnotes": webnotes,
|
||||
"utils": webnotes.utils
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user