add permission tag helper

This commit is contained in:
SamSys
2025-03-17 21:43:43 +03:30
parent c99e242caa
commit 9deb0ca4c6
2 changed files with 10 additions and 6 deletions

View File

@@ -1,4 +1,6 @@
@page
@using _0_Framework.Application
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model ServiceHost.Areas.Client.Pages.Company.Employees.EmployeeListModel
@{
@@ -193,14 +195,14 @@
</div>
<div class="row justify-content-between g-1 mt-1">
<div class="col-6">
<div Permission="@SubAccountPermissionHelper.AddEmployeePermissionCode" class="col-6">
<button class="btn-create w-100" onclick="openCreateEmployeeModal()">
<span>ایجاد پرسنل</span>
</button>
</div>
<div class="col-6">
<div Permission="@SubAccountPermissionHelper.LeftWorkEmployeePermissionCode" class="col-6">
<button class="btn-create w-100" onclick="openCreateLeftWorkEmployeeModal()">
<span>اعلام ترک کار</span>
</button>
@@ -233,7 +235,7 @@
<div class="container-fluid d-none d-md-block" style="padding: 0px 6px">
<div class="row d-none d-md-flex align-items-center my-1 px-0">
<div class="col-4 pe-0">
<button type="button" class="btn-create text-nowrap" onclick="openCreateEmployeeModal()">
<button Permission="@SubAccountPermissionHelper.AddEmployeePermissionCode" type="button" class="btn-create text-nowrap" onclick="openCreateEmployeeModal()">
<svg width="20" height="20" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="8.25" stroke-width="1.5" stroke="white" />
<path d="M11 13.75L11 8.25" stroke-width="1.5" stroke="white" stroke-linecap="round" />
@@ -241,7 +243,7 @@
</svg>
<span>ایجاد پرسنل</span>
</button>
<button type="button" class="btn-create text-nowrap" onclick="openCreateLeftWorkEmployeeModal()">
<button Permission="@SubAccountPermissionHelper.LeftWorkEmployeePermissionCode" type="button" class="btn-create text-nowrap" onclick="openCreateLeftWorkEmployeeModal()">
<svg width="20" height="20" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="8.25" stroke-width="1.5" stroke="white" />
<path d="M11 13.75L11 8.25" stroke-width="1.5" stroke="white" stroke-linecap="round" />

View File

@@ -1,4 +1,6 @@
@page
@using _0_Framework.Application
@using Microsoft.AspNetCore.Mvc.TagHelpers
@model ServiceHost.Areas.Client.Pages.Company.RollCall.EmployeeUploadPictureModel
@{
string clientVersion = _0_Framework.Application.Version.StyleVersion;
@@ -132,7 +134,7 @@
<div class="row px-lg-2 p-auto">
<div class="wrapper bg-white my-1 list-box table-rollcall">
<button class="btnAdd" id="addEmployee" onclick="openCreateEmployeeModal()">
<button Permission="@SubAccountPermissionHelper.AddEmployeePermissionCode" class="btnAdd" id="addEmployee" onclick="openCreateEmployeeModal()">
<span>
<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="11" cy="11" r="8.25" stroke="white"/>