Skip to content
Merged

Dev #2339

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,18 +139,8 @@ private static string CombineEndpointAndPath(string endpoint, string profilePath
{
const char UrlPathSeparator = '/';

if (Uri.TryCreate(profilePath, UriKind.Absolute, out var absoluteUri))
{
return absoluteUri.ToString();
}

var trimmedEndpoint = endpoint.Trim().TrimEnd(UrlPathSeparator);
var trimmedPath = profilePath.Trim();
if (!trimmedPath.StartsWith(UrlPathSeparator))
{
trimmedPath = string.Concat(UrlPathSeparator, trimmedPath);
}

return trimmedEndpoint + trimmedPath;
return endpoint.Trim().TrimEnd(UrlPathSeparator)
+ UrlPathSeparator
+ profilePath.Trim().TrimStart(UrlPathSeparator);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@model Unity.AI.Web.Views.Settings.AISettingGroup.AISettingViewModel

<abp-script src="/Views/Settings/AISettingGroup/Default.js" />

<div class="container-fluid px-0">
<div class="unity-page-titlebar">
<h4 class="m-0">AI Configuration</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $(function () {
}

function updatePreviewAccordion(sortedItems) {
const previewDiv = document.getElementById('preview');
const previewDiv = document.getElementById('scoresheet-preview') || document.getElementById('preview');

if (sortedItems.length === 0) {
previewDiv.innerHTML = '<p>No sections to display.</p>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ $(function () {

function updatePreview() {
let worksheets = $('button.accordion-button[aria-expanded=true]');
const previewPane = $('#preview');
const previewPane = $('#worksheet-preview').length ? $('#worksheet-preview') : $('#preview');

if (worksheets?.length > 0) {
let worksheetId = worksheets[0].dataset.worksheetId;
Expand All @@ -158,7 +158,7 @@ $(function () {
.then(response => response.text())
.then(data => {
previewPane.html(data);
$("#preview :input").prop("readonly", true);
previewPane.find(':input').prop('readonly', true);
PubSub.publish('worksheet_preview_datagrid_refresh');
})
.catch(error => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
@model Unity.Notifications.Web.Views.Settings.NotificationsSettingGroup.NotificationsSettingViewModel

<abp-script src="/Views/Settings/NotificationsSettingGroup/Default.js" />
<abp-script src="/Views/Settings/NotificationsSettingGroup/InternalEmailGroups.js" />
<abp-style src="/Views/Settings/NotificationsSettingGroup/Default.css" />

<div class="container-fluid px-0">
<div class="unity-page-titlebar">
<h4 class="m-0">Notifications</h4>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public override void ConfigureBundle(BundleConfigurationContext context)
context
.Files
.AddIfNotContains("/Views/Settings/NotificationsSettingGroup/Default.js");
context
.Files
.AddIfNotContains("/Views/Settings/NotificationsSettingGroup/InternalEmailGroups.js");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,16 @@
@if (CurrentTenant.Id != null)
{
<abp-dropdown-item href="/ApplicantPortalSettings">Applicant Portal Configuration</abp-dropdown-item>
}
@if (await FeatureChecker.IsEnabledAsync("Unity.Payments") && isAuthorizedForPaymentConfiguration)
{
<abp-dropdown-item href="/PaymentConfigurations">Payments Configuration</abp-dropdown-item>
}
@if (await FeatureChecker.IsEnabledAsync("Unity.Flex"))
}
@if (CurrentUser.IsInRole("system_admin") && await FeatureChecker.IsEnabledAsync("SettingManagement.Enable"))
{
<abp-dropdown-item href="/ScoresheetConfiguration">Scoresheets Configuration</abp-dropdown-item>
<abp-dropdown-item href="/WorksheetConfiguration">Custom Fields Configuration</abp-dropdown-item>
<abp-dropdown-item href="/ConfigurationManagement">Configuration Management</abp-dropdown-item>
}
@if (CurrentUser.IsInRole("ITOperations"))
{
<abp-dropdown-item href="/UnityAdmin">Unity Admin</abp-dropdown-item>
}
@if (CurrentUser.IsInRole("system_admin") && await FeatureChecker.IsEnabledAsync("SettingManagement.Enable"))
{
<abp-dropdown-item href="/SettingManagement">Settings</abp-dropdown-item>
}

<abp-dropdown-item href="/Account/Logout">Logout</abp-dropdown-item>
</abp-dropdown-menu>
</abp-dropdown>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

/**
* Unflatten dot separated JSON objects into nested objects
* Unflatten dot separated JSON objects into nested objects
*/
$.fn.unflattenObject = function(flatObj) {
const result = {};
Expand Down Expand Up @@ -268,6 +268,14 @@ class UnityChangeTrackingForm {
this.saveButton.prop('disabled', this.modifiedFields.size === 0);
}

setSaving(isSaving) {
if (isSaving) {
this.saveButton.prop('disabled', true);
} else {
this.updateSaveButtonState();
}
}

/**
* Reset tracking without changing values
*/
Expand Down Expand Up @@ -354,7 +362,7 @@ class UnityZoneForm extends UnityChangeTrackingForm {
// NOTE Get field value by name or id

isValid() {
return this.form.valid();
return this.form.valid();
}

initializeNumericFields() {
Expand Down Expand Up @@ -441,10 +449,10 @@ class UnityZoneForm extends UnityChangeTrackingForm {
let expandedProperties = {
'name': name,
'tag': this.tagName.toLowerCase(),
'type': this.type
};
tableOutput = { ...tableOutput, ...expandedProperties };
'type': this.type
};

tableOutput = { ...tableOutput, ...expandedProperties };
}

let changeProperties = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"Menu:TenantManagement": "Tenants",
"Menu:EndpointManagement": "Endpoints",
"Menu:Applicants": "Applicants",
"Menu:ConfigurationManagement": "Configuration Management",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to Unity Grant Manager",

Expand Down Expand Up @@ -102,20 +103,20 @@
"ReviewerList:Subtotal": "Subtotal",
"ReviewerList:CloneAssessment": "Clone Assessment",

"AssessmentResultAttachments:Id": "#",
"AssessmentResultAttachments:DocumentName": "Document Name",
"AssessmentResultAttachments:UploadedDate": "Date",
"AssessmentResultAttachments:AttachedBy": "Attached by",
"ChefsAttachments:Title": "Submission Attachments",
"ChefsAttachments:Filter": "Filter",
"ChefsAttachments:Download": "Download",
"ChefsAttachments:GenerateSummaries": "Generate AI Summaries",
"ChefsAttachments:GenerateSummary": "Generate Summary",
"ChefsAttachments:HideAISummaries": "Hide AI Summaries",
"ChefsAttachments:ShowAISummaries": "Show AI Summaries",
"ChefsAttachments:HideSummaries": "Hide Summaries",
"ChefsAttachments:ShowSummaries": "Show Summaries",
"ChefsAttachments:NoSummariesAvailable": "No summaries available",
"AssessmentResultAttachments:Id": "#",
"AssessmentResultAttachments:DocumentName": "Document Name",
"AssessmentResultAttachments:UploadedDate": "Date",
"AssessmentResultAttachments:AttachedBy": "Attached by",
"ChefsAttachments:Title": "Submission Attachments",
"ChefsAttachments:Filter": "Filter",
"ChefsAttachments:Download": "Download",
"ChefsAttachments:GenerateSummaries": "Generate AI Summaries",
"ChefsAttachments:GenerateSummary": "Generate Summary",
"ChefsAttachments:HideAISummaries": "Hide AI Summaries",
"ChefsAttachments:ShowAISummaries": "Show AI Summaries",
"ChefsAttachments:HideSummaries": "Hide Summaries",
"ChefsAttachments:ShowSummaries": "Show Summaries",
"ChefsAttachments:NoSummariesAvailable": "No summaries available",

"Enum:AssessmentState.IN_PROGRESS": "In Progress",
"Enum:AssessmentState.IN_REVIEW": "Under Review by Team Lead",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ public static class GrantManagerMenus
public const string EndpointManagement = Prefix + ".EndpointManagement";
public const string AIReporting = Prefix + ".AIReporting";
public const string Applicants = Prefix + ".Applicants";
public const string ConfigurationManagement = Prefix + ".ConfigurationManagement";
public const string UnityAdmin = Prefix + ".UnityAdmin";
}
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
let jsonText = $('#jsonText').val();
$.parseJSON(jsonText);
let mappingJsonStr = jsonText.replace(/\s+/g, ' ').replace(/(\r\n|\n|\r)/gm, "");
UIElements.btnSaveMapping.prop('disabled', true);
handleSaveMapping($.parseJSON(mappingJsonStr));
handleCancelMapping();

Expand All @@ -150,6 +151,7 @@

}
catch (err) {
UIElements.btnSaveMapping.prop('disabled', false);
abp.notify.error(
'',
'The JSON is not valid:' + err
Expand Down Expand Up @@ -313,6 +315,7 @@
formData["availableChefsFields"] = document.getElementById('availableChefsFields').value;
formData["ChefsApplicationFormGuid"] = document.getElementById('applicationFormId').value;

UIElements.btnSave.prop('disabled', true);
$.ajax(
{
url: "/api/app/application-form-version/" + formVersionId,
Expand All @@ -332,6 +335,9 @@
data.responseText,
'Mapping Not Saved Successful'
);
},
complete: function () {
UIElements.btnSave.prop('disabled', false);
}
}
);
Expand Down Expand Up @@ -640,6 +646,7 @@
};

btnSaveAIConfig.addEventListener('click', function () {
btnSaveAIConfig.disabled = true;
abp.ajax({
url: `/api/app/application-form/${aiFormId}/ai-config`,
type: 'PATCH',
Expand All @@ -658,6 +665,9 @@
})
.fail(function () {
abp.notify.error('Failed to save AI configuration.');
})
.always(function () {
btnSaveAIConfig.disabled = false;
});
});

Expand Down
Loading
Loading