[UPDT] HELPDESK : Updated and tested using multicompany datas
This commit is contained in:
@@ -59,6 +59,7 @@ class DepartmentManager(HorillaModel):
|
||||
company_id = models.ForeignKey(
|
||||
Company, null=True, editable=False, on_delete=models.PROTECT
|
||||
)
|
||||
objects = HorillaCompanyManager("manager__employee_work_info__company_id")
|
||||
|
||||
class Meta:
|
||||
unique_together = ("department", "manager")
|
||||
@@ -112,7 +113,7 @@ class Ticket(HorillaModel):
|
||||
],
|
||||
)
|
||||
objects = HorillaCompanyManager(
|
||||
related_company_field="employee_id__employee__work_info__company_id"
|
||||
related_company_field="employee_id__employee_work_info__company_id"
|
||||
)
|
||||
|
||||
class Meta:
|
||||
|
||||
@@ -764,6 +764,11 @@ def ticket_filter(request):
|
||||
allocated_page_number = request.GET.get("allocated_page")
|
||||
tickets_items1 = Ticket.objects.none()
|
||||
tickets_items2 = Ticket.objects.none()
|
||||
print("<<<<<<<<<>>>>>>>>>>>>>>")
|
||||
print("<<<<<<<<<>>>>>>>>>>>>>>")
|
||||
print(request.GET.get("view"))
|
||||
print("<<<<<<<<<>>>>>>>>>>>>>>")
|
||||
print("<<<<<<<<<>>>>>>>>>>>>>>")
|
||||
|
||||
my_tickets = tickets.filter(employee_id=request.user.employee_get) | tickets.filter(
|
||||
created_by=request.user
|
||||
@@ -793,6 +798,10 @@ def ticket_filter(request):
|
||||
tickets_items3 = ticket_list.filter(raised_on=user.id, assigning_type="individual")
|
||||
|
||||
template = "helpdesk/ticket/ticket_list.html"
|
||||
print("========================")
|
||||
print(request.GET.get("view"))
|
||||
print("========================")
|
||||
|
||||
if request.GET.get("view") == "card":
|
||||
template = "helpdesk/ticket/ticket_card.html"
|
||||
allocated_tickets = (
|
||||
|
||||
Reference in New Issue
Block a user