Skip to content
Merged

Dev #2669

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 @@ -57,7 +57,7 @@
private readonly ICurrentTenant _currentTenant;
private readonly ILibreOfficeConversionService _libreOfficeConversionService;
private readonly IAttachmentPreviewAppService _attachmentPreviewAppService;
private ILogger Logger => LazyServiceProvider.LazyGetService<ILogger>(provider => LoggerFactory?.CreateLogger(GetType().FullName!) ?? NullLogger.Instance);

Check warning on line 60 in applications/Unity.GrantManager/src/Unity.GrantManager.HttpApi/Controllers/AttachmentController.cs

View workflow job for this annotation

GitHub Actions / test-project (applications/Unity.GrantManager/modules/Unity.Flex/test/Unity.Flex.Web.Tests/Unity....

'AttachmentController.Logger' hides inherited member 'AbpController.Logger'. Use the new keyword if hiding was intended.

Check warning on line 60 in applications/Unity.GrantManager/src/Unity.GrantManager.HttpApi/Controllers/AttachmentController.cs

View workflow job for this annotation

GitHub Actions / test-project (applications/Unity.GrantManager/test/Unity.GrantManager.Web.Tests/Unity.GrantManage...

'AttachmentController.Logger' hides inherited member 'AbpController.Logger'. Use the new keyword if hiding was intended.

Check warning on line 60 in applications/Unity.GrantManager/src/Unity.GrantManager.HttpApi/Controllers/AttachmentController.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

'AttachmentController.Logger' hides inherited member 'AbpController.Logger'. Use the new keyword if hiding was intended.

Check warning on line 60 in applications/Unity.GrantManager/src/Unity.GrantManager.HttpApi/Controllers/AttachmentController.cs

View workflow job for this annotation

GitHub Actions / SonarCloud

'AttachmentController.Logger' hides inherited member 'AbpController.Logger'. Use the new keyword if hiding was intended.

Check warning on line 60 in applications/Unity.GrantManager/src/Unity.GrantManager.HttpApi/Controllers/AttachmentController.cs

View workflow job for this annotation

GitHub Actions / test-project (applications/Unity.GrantManager/test/Unity.GrantManager.Application.Tests/Unity.Gra...

'AttachmentController.Logger' hides inherited member 'AbpController.Logger'. Use the new keyword if hiding was intended.
private const string badRequestFileMsg = "File name must be provided.";
private const string NotFoundFileMsg = "File not found.";
private const string errorFileMsg = "An error occurred while downloading the file.";
Expand Down Expand Up @@ -459,6 +459,7 @@
return await UploadEmailAttachments(emailLogId, null, files);
}

[NonAction]
public async Task<IActionResult> UploadEmailAttachments(Guid? emailLogId, Guid? templateId, IList<IFormFile> files)
{
if (!ModelState.IsValid)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
if (!$counter.length) {
$counter = $('<div class="char-counter"></div>').insertAfter($input);
}
function updateCounter() {
const updateCounter = () => {
const currentLength = $input.val().length;
$counter.text(currentLength + '/' + maxLength);

const percentageUsed = (currentLength / maxLength) * 100;
$counter.toggleClass('char-counter-critical', percentageUsed >= 95);
$counter.toggleClass('char-counter-warning', percentageUsed >= 80 && percentageUsed < 95);
}
};

$input.on('input', updateCounter);
updateCounter();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,28 +30,28 @@
description: $descriptionInput.val().trim()
};

function getProgramDetailsValues() {
const getProgramDetailsValues = () => {
return {
displayName: $displayNameInput.val().trim(),
division: $divisionInput.val().trim(),
branch: $branchInput.val().trim(),
description: $descriptionInput.val().trim()
};
}
};

function hasProgramDetailsChanges() {
const hasProgramDetailsChanges = () => {
const currentValues = getProgramDetailsValues();
return currentValues.displayName !== originalProgramDetailsValues.displayName
|| currentValues.division !== originalProgramDetailsValues.division
|| currentValues.branch !== originalProgramDetailsValues.branch
|| currentValues.description !== originalProgramDetailsValues.description;
}
};

function updateProgramDetailsButtonStates() {
const updateProgramDetailsButtonStates = () => {
const changed = hasProgramDetailsChanges();
$programDetailsSaveButton.prop('disabled', !changed);
$programDetailsResetButton.prop('disabled', !changed);
}
};

const debouncedProgramDetailsButtonUpdate = debounce(updateProgramDetailsButtonStates, 150);

Expand Down
Loading