Thanks for the info.
Still having problems I added "node_modules/@fortawesome/fontawesome-pro/css/fontawesome.css": "@fortawesome/fontawesome-pro/css/"
to package-mapping-config.js and "wwwroot/lib/@fortawesome/fontawesome-pro/css/fontawesome.css"
to the "outputFileName": "wwwroot/view-resources/Areas/App/Views/Bundles/vendors.bundle.css" section of bundleconfig.json
When I run "npm run create-bundles" I get the error npm : npm ERR! missing script: create-bundles.
I can perform a project build which tells me fontawesome.css is missing and of course no icons display.
Going to be away for a week, so I will have to follow this up when I get back.
I'm having trouble getting access to your git-hub and I will be away for 1 week so I'll have to raise that when I get back.
In my original question I was showing the two validation methods for two differnt different HTML inputs.
A better way to have asked this question would be :-
If I add pattern="[0-9]{6-12}"
to a HTML input what extra do I need to get the JQuery Validator to validate that value ?
Do I create my own custom JQuery Validation method (a per my original question) ? OR am I missing something obvious ?
Keep in mind the pages I am updating were generated by the RAD tool.
Thanks again maliming, your support is top notch. The feedback you gave me was great. A bit more reading and I have gotten my code working. I know for some people this is obvious but for me sometimes I miss something obvious which then of course slow me down.
_superFundLookupService.getSuperFundPaymentMethodFromID($('#SuperFund_PaymentMethod').val())
.done(function (result) {
switch (result) {
case "BPAY":
$("#BPAY_Section").show();
$("#EFT_Section").hide();
break;
case "EFT":
$("#BPAY_Section").hide();
$("#EFT_Section").show();
break;
default:
$("#BPAY_Section").hide();
$("#EFT_Section").hide();
break;
}
});
Sorry about the confusion, but the original question title is incorrect and I have changed that. What I am trying to work is how do make my custom Application Services accessable to my .js files ? I am still a bit confused since only the Services created by the RAD tool work in JQuery. I know it will be something simple but the more I read the more it makes no sense to me.
So here is the Interface that was generated by the RAD tool (with a small edit afterwards)
public interface ISuperFundsAppService : IApplicationService
{
Task<PagedResultDto<GetSuperFundForView>> GetAll(GetAllSuperFundsInput input);
Task<GetSuperFundForEditOutput> GetSuperFundForEdit(EntityDto<long> input);
Task CreateOrEdit(CreateOrEditSuperFundDto input);
Task Delete(EntityDto<long> input);
Task<FileDto> GetSuperFundsToExcel(GetAllSuperFundsForExcelInput input);
Task<List<ComboboxItemDto>> GetSuperComboItems(long? selectedId = null);
}
I then created a new interface for processing dropdowns
public interface ISuperFundLookupAppService : IApplicationService
{
List<ComboboxItemDto> GetSuperFundTypeComboItems(int? selectedId = null);
string GetSuperFundTypeFromID(int inputId);
List<ComboboxItemDto> GetSuperFundPaymentFrequencyComboItems(int? selectedId = null);
string GetSuperFundPaymentFrequencyFromID(int inputId);
List<ComboboxItemDto> GetSuperFundPaymentMethodComboItems(int? selectedId = null);
string GetSuperFundPaymentMethodFromID(int inputId);
}
I added the new controller to the MVC - Controller
[Area("App")]
[AbpMvcAuthorize(AppPermissions.Pages_SuperFunds)]
public class SuperFundsController : epaydayControllerBase
{
private readonly ISuperFundsAppService _superFundsAppService;
private readonly ISuperFundLookupAppService _superFundLookupAppService;
private readonly IValueTranslationAppService _valueTranslationAppService;
public SuperFundsController(
ISuperFundsAppService superFundsAppService,
ISuperFundLookupAppService superFundLookupAppService,
IValueTranslationAppService valueTranslationAppService)
{
_superFundsAppService = superFundsAppService;
_superFundLookupAppService = superFundLookupAppService;
_valueTranslationAppService = valueTranslationAppService;
}
Part of the index.js
(function () {
$(function () {
var _$superFundsTable = $('#SuperFundsTable');
var _superFundsService = abp.services.app.superFunds;
var _entityTypeFullName = 'epayday.Epayday.SuperFunds.SuperFund';
But I can't access the lookup service with something like
abp.services.app.superFundLookup
Abp v4.1.0 ASP.NET CORE MVC & jQuery .NET Core 2.2 v6.4.0
Thanks for the prompt response.