mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-22 20:09:54 +00:00
feat: 工单多级审批 + 模版创建 (#6640)
* feat: 工单多级审批 + 模版创建 * feat: 工单权限处理 * fix: 工单关闭后 再审批bug * perf: 修改一点 Co-authored-by: feng626 <1304903146@qq.com> Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
from django.db.models import TextChoices
|
||||
from django.db.models import TextChoices, IntegerChoices
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
TICKET_DETAIL_URL = '/ui/#/tickets/tickets/{id}'
|
||||
|
||||
|
||||
class TicketTypeChoices(TextChoices):
|
||||
class TicketType(TextChoices):
|
||||
general = 'general', _("General")
|
||||
login_confirm = 'login_confirm', _("Login confirm")
|
||||
apply_asset = 'apply_asset', _('Apply for asset')
|
||||
@@ -13,13 +13,38 @@ class TicketTypeChoices(TextChoices):
|
||||
command_confirm = 'command_confirm', _('Command confirm')
|
||||
|
||||
|
||||
class TicketActionChoices(TextChoices):
|
||||
class TicketState(TextChoices):
|
||||
open = 'open', _('Open')
|
||||
approve = 'approve', _('Approve')
|
||||
reject = 'reject', _('Reject')
|
||||
close = 'close', _('Close')
|
||||
approved = 'approved', _('Approved')
|
||||
rejected = 'rejected', _('Rejected')
|
||||
closed = 'closed', _('Closed')
|
||||
|
||||
|
||||
class TicketStatusChoices(TextChoices):
|
||||
class ProcessStatus(TextChoices):
|
||||
notified = 'notified', _('Notified')
|
||||
approved = 'approved', _('Approved')
|
||||
rejected = 'rejected', _('Rejected')
|
||||
|
||||
|
||||
class TicketStatus(TextChoices):
|
||||
open = 'open', _("Open")
|
||||
closed = 'closed', _("Closed")
|
||||
|
||||
|
||||
class TicketAction(TextChoices):
|
||||
open = 'open', _("Open")
|
||||
close = 'close', _("Close")
|
||||
approve = 'approve', _('Approve')
|
||||
reject = 'reject', _('Reject')
|
||||
|
||||
|
||||
class TicketApprovalLevel(IntegerChoices):
|
||||
one = 1, _("One level")
|
||||
two = 2, _("Two level")
|
||||
|
||||
|
||||
class TicketApprovalStrategy(TextChoices):
|
||||
super = 'super', _("Super user")
|
||||
admin = 'admin', _("Admin user")
|
||||
super_admin = 'super_admin', _("Super admin user")
|
||||
custom = 'custom', _("Custom user")
|
||||
|
Reference in New Issue
Block a user