2021-08-25 11:02:50 +00:00
|
|
|
from django.db.models import TextChoices, IntegerChoices
|
2020-12-29 16:19:59 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _
|
|
|
|
|
2022-03-17 03:57:25 +00:00
|
|
|
TICKET_DETAIL_URL = '/ui/#/tickets/tickets/{id}?type={type}'
|
2020-12-29 16:19:59 +00:00
|
|
|
|
|
|
|
|
2021-08-25 11:02:50 +00:00
|
|
|
class TicketType(TextChoices):
|
2020-12-29 16:19:59 +00:00
|
|
|
general = 'general', _("General")
|
|
|
|
login_confirm = 'login_confirm', _("Login confirm")
|
|
|
|
apply_asset = 'apply_asset', _('Apply for asset')
|
|
|
|
apply_application = 'apply_application', _('Apply for application')
|
2021-03-11 12:17:44 +00:00
|
|
|
login_asset_confirm = 'login_asset_confirm', _('Login asset confirm')
|
2021-04-26 09:56:06 +00:00
|
|
|
command_confirm = 'command_confirm', _('Command confirm')
|
2020-12-29 16:19:59 +00:00
|
|
|
|
|
|
|
|
2021-08-25 11:02:50 +00:00
|
|
|
class TicketState(TextChoices):
|
2022-06-23 05:52:28 +00:00
|
|
|
pending = 'pending', _('Open')
|
2021-08-25 11:02:50 +00:00
|
|
|
approved = 'approved', _('Approved')
|
|
|
|
rejected = 'rejected', _('Rejected')
|
2022-06-23 05:52:28 +00:00
|
|
|
closed = 'closed', _("Cancel")
|
|
|
|
reopen = 'reopen', _("Reopen")
|
2021-08-25 11:02:50 +00:00
|
|
|
|
|
|
|
|
2022-06-23 05:52:28 +00:00
|
|
|
class TicketStatus(TextChoices):
|
|
|
|
open = 'open', _("Open")
|
|
|
|
closed = 'closed', _("Finished")
|
|
|
|
|
|
|
|
|
|
|
|
class StepState(TextChoices):
|
|
|
|
pending = 'pending', _('Pending')
|
2021-08-25 11:02:50 +00:00
|
|
|
approved = 'approved', _('Approved')
|
|
|
|
rejected = 'rejected', _('Rejected')
|
2022-06-23 05:52:28 +00:00
|
|
|
closed = 'closed', _("Closed")
|
|
|
|
reopen = 'reopen', _("Reopen")
|
2020-12-29 16:19:59 +00:00
|
|
|
|
|
|
|
|
2022-06-23 05:52:28 +00:00
|
|
|
class StepStatus(TextChoices):
|
|
|
|
pending = 'pending', _('Pending')
|
|
|
|
active = 'active', _('Active')
|
2020-12-29 16:19:59 +00:00
|
|
|
closed = 'closed', _("Closed")
|
2021-08-25 11:02:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TicketAction(TextChoices):
|
|
|
|
open = 'open', _("Open")
|
|
|
|
close = 'close', _("Close")
|
|
|
|
approve = 'approve', _('Approve')
|
|
|
|
reject = 'reject', _('Reject')
|
|
|
|
|
|
|
|
|
2022-06-23 05:52:28 +00:00
|
|
|
class TicketLevel(IntegerChoices):
|
2021-08-25 11:02:50 +00:00
|
|
|
one = 1, _("One level")
|
|
|
|
two = 2, _("Two level")
|
|
|
|
|
|
|
|
|
|
|
|
class TicketApprovalStrategy(TextChoices):
|
2021-08-27 09:55:51 +00:00
|
|
|
super_admin = 'super_admin', _("Super admin")
|
|
|
|
org_admin = 'org_admin', _("Org admin")
|
|
|
|
super_org_admin = 'super_org_admin', _("Super admin and org admin")
|
2021-08-26 10:29:02 +00:00
|
|
|
custom_user = 'custom_user', _("Custom user")
|