Denying attestation works and has nice feedback.
This commit is contained in:
+2
-2
@@ -70,7 +70,7 @@ namespace Swarmops.Logic.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [OrganizationName] Cash Advance Attested: [CurrencyCode] [BudgetAmountFloat].
|
||||
/// Looks up a localized string similar to [[OrganizationName]] Cash Advance Attested: [CurrencyCode] [BudgetAmountFloat].
|
||||
/// </summary>
|
||||
internal static string CashAdvance_Attested_Subject {
|
||||
get {
|
||||
@@ -90,7 +90,7 @@ namespace Swarmops.Logic.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to [OrganizationName] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat].
|
||||
/// Looks up a localized string similar to [[OrganizationName]] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat].
|
||||
/// </summary>
|
||||
internal static string CashAdvance_Deattested_Subject {
|
||||
get {
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
<value>Your requested cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been attested by the budget owner. It will now proceed to payout to you.</value>
|
||||
</data>
|
||||
<data name="CashAdvance_Attested_Subject" xml:space="preserve">
|
||||
<value>[OrganizationName] Cash Advance Attested: [CurrencyCode] [BudgetAmountFloat]</value>
|
||||
<value>[[OrganizationName]] Cash Advance Attested: [CurrencyCode] [BudgetAmountFloat]</value>
|
||||
</data>
|
||||
<data name="CashAdvance_Deattested_Body" xml:space="preserve">
|
||||
<value>Your requested cash advance with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat], concerning [RequestPurpose], has been DE-attested by the budget owner. This usually indicates some sort of problem with your request.
|
||||
@@ -129,7 +129,7 @@
|
||||
Expect more communication from the budget owner to follow on the matter.</value>
|
||||
</data>
|
||||
<data name="CashAdvance_Deattested_Subject" xml:space="preserve">
|
||||
<value>[OrganizationName] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat]</value>
|
||||
<value>[[OrganizationName]] Cash Advance DE-attested: [CurrencyCode] [BudgetAmountFloat]</value>
|
||||
</data>
|
||||
<data name="CashAdvance_Denied_Body" xml:space="preserve">
|
||||
<value>Your expense claim with [OrganizationName] for [CurrencyCode] [BudgetAmountFloat] concerning [RequestPurpose] has been denied. The text below was given as reason for denying it:
|
||||
|
||||
@@ -303,6 +303,7 @@
|
||||
$('#IconApproval' + recordId).hide();
|
||||
$('#IconDenial' + recordId).hide();
|
||||
$('#IconDenied' + recordId).attr('src', '/Images/Abstract/ajaxloader-48x36px.gif');
|
||||
$('#IconDenied' + recordId).show();
|
||||
<%= this.DialogDeny.ClientID %>_close();
|
||||
|
||||
SwarmopsJS.ajaxCall(
|
||||
@@ -312,6 +313,8 @@
|
||||
if (result.Success) {
|
||||
$(this).attr("src", "/Images/Icons/iconshock-red-cross-circled-128x96px.png");
|
||||
$(this).fadeIn(); // was visible already, but this will create an effect as it changes image
|
||||
$('.row' + $(this).attr('baseid')).animate({ color: "#CCC" }, 500);
|
||||
$('.row' + $(this).attr('baseid')).css('text-decoration', 'line-through');
|
||||
} else {
|
||||
// Failure can happen for many reasons, all bad, so we're just reloading the
|
||||
// entire grid to cover our bases
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial
|
||||
|
||||
|
||||
[WebMethod]
|
||||
public static void DenyItem (string recordId, string reason)
|
||||
public static AjaxCallResult DenyItem (string recordId, string reason)
|
||||
{
|
||||
AuthenticationData authData = GetAuthenticationDataAndCulture();
|
||||
IPayable payable = PayableFromRecordId (recordId);
|
||||
@@ -145,7 +145,14 @@ namespace Swarmops.Frontend.Pages.v5.Financial
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty (reason.Trim()))
|
||||
{
|
||||
reason = Resources.Global.Global_NoReasonGiven;
|
||||
}
|
||||
|
||||
payable.DenyAttestation (authData.CurrentUser, reason);
|
||||
|
||||
return new AjaxCallResult { Success = true };
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user