mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
775 B
28 lines
775 B
4 years ago
|
from django.db.models import TextChoices
|
||
|
from django.utils.translation import ugettext_lazy as _
|
||
|
|
||
|
TICKET_DETAIL_URL = '/ui/#/tickets/tickets/{id}'
|
||
|
|
||
|
|
||
|
class TicketTypeChoices(TextChoices):
|
||
|
general = 'general', _("General")
|
||
|
login_confirm = 'login_confirm', _("Login confirm")
|
||
|
apply_asset = 'apply_asset', _('Apply for asset')
|
||
|
apply_application = 'apply_application', _('Apply for application')
|
||
|
|
||
|
@classmethod
|
||
|
def types(cls):
|
||
|
return set(dict(cls.choices).keys())
|
||
|
|
||
|
|
||
|
class TicketActionChoices(TextChoices):
|
||
|
apply = 'apply', _('Apply')
|
||
|
approve = 'approve', _('Approve')
|
||
|
reject = 'reject', _('Reject')
|
||
|
close = 'close', _('Close')
|
||
|
|
||
|
|
||
|
class TicketStatusChoices(TextChoices):
|
||
|
open = 'open', _("Open")
|
||
|
closed = 'closed', _("Closed")
|