Skip to content

Commit d44cdcd

Browse files
authored
Merge pull request #139 from mspnp/dev
v4.3.1 Updates
2 parents ae2fbee + 6e3f420 commit d44cdcd

6 files changed

Lines changed: 105 additions & 3 deletions

File tree

src/Components/Modals/AddModal.razor

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@
8080
}
8181
</div>
8282
}
83+
<div class="mb-3">
84+
<div class="fw-bold">
85+
Description
86+
</div>
87+
<div>
88+
<input title="Decription" value="@itemDescription" type="text" class="form-control @theme.ThemeStyle" id="minlength" @onchange="@((ui) => { itemDescription = (string)ui.Value!;})" />
89+
</div>
90+
</div>
8391
<div class="mb-3">
8492
<div class="fw-bold">
8593
Minimum Length
@@ -299,6 +307,7 @@
299307
private ServiceResponse serviceResponse = new();
300308
private string itemName = String.Empty;
301309
private string itemShortName = String.Empty;
310+
private string itemDescription = String.Empty;
302311
private string itemMinLength = "1";
303312
private string itemMaxLength = "10";
304313
private string itemScope = "";
@@ -362,6 +371,7 @@
362371
{
363372
Name = itemName,
364373
DisplayName = itemName,
374+
Description = itemDescription,
365375
IsCustom = true,
366376
IsFreeText = itemIsFreeText,
367377
MinLength = itemMinLength,

src/Components/Modals/EditModal.razor

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@
100100
}
101101
@if ((type == "ResourceComponent") || ((type == "ResourceType") && (Convert.ToBoolean(config.ResourceTypeEditingAllowed))))
102102
{
103+
<div class="mb-3">
104+
<div class="fw-bold">
105+
Description
106+
</div>
107+
<div>
108+
<input title="Description" value="@itemDescription" type="text" class="form-control @theme.ThemeStyle" id="maxlength" @onchange="@((ui) => { itemDescription = (string)ui.Value!;})" />
109+
</div>
110+
</div>
103111
@if ((type == "ResourceComponent") && (itemIsCustom))
104112
{
105113
<div class="mb-3">
@@ -600,6 +608,7 @@
600608
private string itemName = String.Empty;
601609
private string itemDisplayName = String.Empty;
602610
private string itemShortName = String.Empty;
611+
private string itemDescription = String.Empty;
603612
private string itemRegEx = String.Empty;
604613
private string itemMinLength = String.Empty;
605614
private string itemMaxLength = String.Empty;
@@ -643,6 +652,7 @@
643652
ResourceComponent resourceComponent = servicesData.ResourceComponents!.Find(x => x.Id == id)!;
644653
itemName = resourceComponent.Name;
645654
itemDisplayName = resourceComponent.DisplayName;
655+
itemDescription = resourceComponent.Description;
646656
itemMinLength = resourceComponent.MinLength;
647657
itemMinLengthOriginal = itemMinLength;
648658
itemMaxLength = resourceComponent.MaxLength;
@@ -771,6 +781,7 @@
771781
{
772782
resourceComponent.DisplayName = itemDisplayName;
773783
}
784+
resourceComponent.Description = itemDescription;
774785
resourceComponent.MinLength = itemMinLength;
775786
resourceComponent.MaxLength = itemMaxLength;
776787
resourceComponent.ApplyDelimiterBefore = itemApplyDelimiterBefore;

src/Components/Pages/Admin.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@
753753
<div class="collapse show card card-body @theme.ThemeStyle" id="resetsitesettings">
754754
<div class="mb-3">
755755
<p>
756-
This will reset <span class="fw-bold">ALL</span> site settings to the default values. This includes site settings and cusomtizations. This cannot be undone!
756+
This will reset <span class="fw-bold">ALL</span> site settings to the default values. This includes site settings and customizations. This cannot be undone!
757757
</p>
758758
</div>
759759
<div class="mb-3">
@@ -1255,7 +1255,7 @@
12551255
break;
12561256

12571257
case "resetsitesettings":
1258-
confirm = await ModalHelper.ShowConfirmationModal(Modal!, "ATTENTION", "<div class=\"my-4\">This will reset <span class=\"fw-bold\">ALL</span> site settings. This includes site settings and cusomtizations.</div><div class=\"my-4\">Are you sure?</div>", "bg-danger", theme);
1258+
confirm = await ModalHelper.ShowConfirmationModal(Modal!, "ATTENTION", "<div class=\"my-4\">This will reset <span class=\"fw-bold\">ALL</span> site settings. This includes site settings and customizations.</div><div class=\"my-4\">Are you sure?</div>", "bg-danger", theme);
12591259
if (confirm)
12601260
{
12611261
// Create new default configuration

src/Components/Pages/Configuration.razor

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
<thead>
182182
<tr>
183183
<th>Name</th>
184+
<th>Description</th>
184185
@if (admin)
185186
{
186187
<th>Actions</th>
@@ -191,7 +192,7 @@
191192
@foreach (var item in @servicesData.ResourceComponents!)
192193
{
193194
<tr class="@GeneralHelper.SetTextEnabledClass(item.Enabled)">
194-
<td class="w-50">
195+
<td class="w-30">
195196
@item.DisplayName
196197
@if (item.IsCustom)
197198
{
@@ -200,6 +201,9 @@
200201
</span>
201202
}
202203
</td>
204+
<td class="w-30">
205+
@item.Description
206+
</td>
203207
@if (admin)
204208
{
205209
<td>
@@ -467,6 +471,10 @@
467471
@if (!customComponent.IsFreeText)
468472
{
469473
<div class="collapse card card-body @theme.ThemeStyle" id=@("custom" + customComponent.Id.ToString())>
474+
@if (!String.IsNullOrEmpty(customComponent.Description))
475+
{
476+
<p>@customComponent.Description</p>
477+
}
470478
<div class="card mb-3">
471479
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
472480
Current Components
@@ -630,6 +638,10 @@
630638
</a>
631639
</h5>
632640
<div class="collapse card card-body @theme.ThemeStyle" id="environments">
641+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
642+
{
643+
<p>@resourceComponent.Description</p>
644+
}
633645
<div class="card mb-3">
634646
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
635647
Current Environments
@@ -789,6 +801,10 @@
789801
</a>
790802
</h5>
791803
<div class="collapse card card-body @theme.ThemeStyle" id="functions">
804+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
805+
{
806+
<p>@resourceComponent.Description</p>
807+
}
792808
<div class="card mb-3">
793809
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
794810
Current Functions
@@ -949,6 +965,10 @@
949965
</a>
950966
</h5>
951967
<div class="collapse card card-body @theme.ThemeStyle" id="locations">
968+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
969+
{
970+
<p>@resourceComponent.Description</p>
971+
}
952972
<div class="card mb-3">
953973
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
954974
Current Locations
@@ -1163,6 +1183,10 @@
11631183
</a>
11641184
</h5>
11651185
<div class="collapse card card-body @theme.ThemeStyle" id="orgs">
1186+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
1187+
{
1188+
<p>@resourceComponent.Description</p>
1189+
}
11661190
<div class="card mb-3">
11671191
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
11681192
Current Orgs
@@ -1323,6 +1347,10 @@
13231347
</a>
13241348
</h5>
13251349
<div class="collapse card card-body @theme.ThemeStyle" id="projsappssvcs">
1350+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
1351+
{
1352+
<p>@resourceComponent.Description</p>
1353+
}
13261354
<div class="card mb-3">
13271355
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
13281356
Current Projects/Apps/Services
@@ -1482,6 +1510,10 @@
14821510
</a>
14831511
</h5>
14841512
<div class="collapse card card-body @theme.ThemeStyle" id="types">
1513+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
1514+
{
1515+
<p>@resourceComponent.Description</p>
1516+
}
14851517
<div class="card mb-3">
14861518
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
14871519
Current Resource Types
@@ -1640,6 +1672,10 @@
16401672
</a>
16411673
</div>
16421674
<div class="collapse card card-body @theme.ThemeStyle" id="typesconfig">
1675+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
1676+
{
1677+
<p>@resourceComponent.Description</p>
1678+
}
16431679
<div class="card w-auto mb-3">
16441680
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
16451681
Bulk Update
@@ -1769,6 +1805,10 @@
17691805
</a>
17701806
</h5>
17711807
<div class="collapse card card-body @theme.ThemeStyle" id="unitsdepts">
1808+
@if (!String.IsNullOrEmpty(resourceComponent.Description))
1809+
{
1810+
<p>@resourceComponent.Description</p>
1811+
}
17721812
<div class="card mb-3">
17731813
<div class="card card-header bg-default text-dark" style="font-weight:bold;">
17741814
Current Units/Depts

0 commit comments

Comments
 (0)