Hello Sir,
Is there anyway to create a Seed Data on Creation of Tenant ?
Hello
Can you help me to elaborate the Use case of Hierarchical Organization Units ?
How to use in our applications ?
Thanks Sir
Got it working
Will share you the link soonest
Thanks Much
it works perfectly
and i forgot to set the bearer there in the request
Hello Sir,
Is it possible to have a three level navigation in theme ?
I have tried but it did not come ?
and second one is
Add the Navigation Provider is confusing when you have so many items
I have tried like below but did not come
Do you have any documentation for that ?
var menu =
context.Manager.Menus[MenuName] = new MenuDefinition(MenuName, new FixedLocalizableString("Main Menu"));
var tenant =
menu.AddItem(new MenuItemDefinition(PageNames.App.Host.Tenants, L("Tenants"), url: "Mpa/Tenants",
icon: "icon-globe", requiredPermissionName: AppPermissions.Pages_Tenants));
var edition =
menu.AddItem(new MenuItemDefinition(PageNames.App.Host.Editions, L("Editions"), url: "Mpa/Editions",
icon: "icon-grid", requiredPermissionName: AppPermissions.Pages_Editions));
var dashboard =
menu.AddItem(new MenuItemDefinition(PageNames.App.Tenant.Dashboard, L("Dashboard"), url: "Mpa/Dashboard",
icon: "icon-home", requiredPermissionName: AppPermissions.Pages_Tenant_Dashboard));
var connect =
menu.AddItem(new MenuItemDefinition(PageNames.App.Tenant.Connect, L("Connect"), "fa fa-connectdevelop"));
var master =
connect.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.Master, L("Master"), "fa fa-indent",
requiredPermissionName: AppPermissions.Pages_Tenant_Master));
master.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.Restaurant, L("Restaurant"),
url: "Mpa/Restaurant", icon: "fa fa-cutlery",
requiredPermissionName: AppPermissions.Pages_Tenant_Master_Restaurant));
master.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.PaymentType, L("PaymentType"),
url: "Mpa/PaymentType", icon: "fa fa-money",
requiredPermissionName: AppPermissions.Pages_Tenant_Master_PaymentType));
master.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.TransactionType, L("TransactionType"),
url: "Mpa/TransactionType", icon: "fa fa-database",
requiredPermissionName: AppPermissions.Pages_Tenant_Master_TransactionType));
var cmenu =
connect.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.Menu, L("Menu"), "fa fa-bullseye",
requiredPermissionName: AppPermissions.Pages_Tenant_Menu));
cmenu.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.Category, L("Category"),
url: "Mpa/Category",
icon: "fa fa-futbol-o", requiredPermissionName: AppPermissions.Pages_Tenant_Master_Category));
cmenu.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.MenuItem, L("MenuItem"),
url: "Mpa/MenuItem", icon: "fa fa-bars",
requiredPermissionName: AppPermissions.Pages_Tenant_Menu_MenuItem
));
var creports =
connect.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.Ticket, L("Report"), "fa fa-flag",
requiredPermissionName: AppPermissions.Pages_Tenant_Ticket));
creports.AddItem(new MenuItemDefinition(PageNames.App.ConnectMaster.AllTicket, L("AllTickets"),
url: "Mpa/Ticket", icon: "fa fa-ellipsis-v"));
var admin =
menu.AddItem(new MenuItemDefinition(PageNames.App.Common.Administration, L("Administration"),
"icon-wrench"));
admin.AddItem(new MenuItemDefinition(PageNames.App.Common.Roles, L("Roles"), url: "Mpa/Roles",
icon: "icon-briefcase", requiredPermissionName: AppPermissions.Pages_Administration_Roles));
admin.AddItem(new MenuItemDefinition(PageNames.App.Common.Users, L("Users"), url: "Mpa/Users",
icon: "icon-users", requiredPermissionName: AppPermissions.Pages_Administration_Users));
admin.AddItem(new MenuItemDefinition(PageNames.App.Common.Languages, L("Languages"), url: "Mpa/Languages",
icon: "icon-flag", requiredPermissionName: AppPermissions.Pages_Administration_Languages
));
admin.AddItem(new MenuItemDefinition(PageNames.App.Common.AuditLogs, L("AuditLogs"), url: "Mpa/AuditLogs",
icon: "icon-lock", requiredPermissionName: AppPermissions.Pages_Administration_AuditLogs
));
admin.AddItem(new MenuItemDefinition(PageNames.App.Host.Settings, L("Settings"), url: "Mpa/HostSettings",
icon: "icon-settings", requiredPermissionName: AppPermissions.Pages_Administration_Host_Settings
));
admin.AddItem(new MenuItemDefinition(PageNames.App.Tenant.Settings, L("Settings"), url: "Mpa/Settings",
icon: "icon-settings",
requiredPermissionName: AppPermissions.Pages_Administration_Tenant_Settings));
Hello Sir,
I am building a Master Child Table but it seems like it throws the error at the Javascript at ABP.
Here is my code and let me know if there is any bug in the ABP
My JavaScript as
(function () {
$(function () {
var _$jsTable = $('#TicketTable');
var _appService = abp.services.app.ticket;
var _$filterForm = $('#TicketForm');
var _todayAsString = moment().format('YYYY-MM-DD');
var _selectedDateRange = {
startDate: _todayAsString,
endDate: _todayAsString
};
_$filterForm.find('input.date-range-picker').daterangepicker(
$.extend(true, app.createDateRangePickerOptions(), _selectedDateRange),
function (start, end, label) {
_selectedDateRange.startDate = start.format('YYYY-MM-DD');
_selectedDateRange.endDate = end.format('YYYY-MM-DD');
});
_$jsTable.jtable({
paging: true,
sorting: true,
pageSize: 20,
multiSorting: true,
title: app.localize('Tickets'),
actions: {
listAction: {
method: _appService.getTickets
}
},
fields: {
id: {
key: true,
list: false
},
payments: {
title: '',
width: '5%',
sorting: false,
display: function (paymentData) {
var $img = $('<span>Payments</span>');
$img.click(function () {
$('#TicketTable').jtable('openChildTable',
$img.closest('tr'),
{
title: 'PAYMENTS FOR TICKET : ' + paymentData.record.ticketNumber,
actions: {
listAction: {
method: _appService.getPaymentForTicketId(paymentData.record.id)
}
},
fields: {
Id: {
key: true,
list: false
},
Amount: {
title: app.localize('TotalAmount'),
width: '25%',
display: function (data) {
var $span = $('<span></span>');
$span.append(data.record.Amount + " ");
return $span;
}
}
}
}, function (data) { //opened handler
data.childTable.jtable('load');
});
});
//Return image to show on the person row
return $img;
}
},
ticketNumber: {
title: app.localize('TicketNumber'),
width: '25%',
display: function (data) {
var $span = $('<span></span>');
$span.append(data.record.ticketNumber + " ");
return $span;
}
},
totalAmount: {
title: app.localize('TotalAmount'),
width: '25%',
display: function (data) {
var $span = $('<span></span>');
$span.append(data.record.totalAmount + " ");
return $span;
}
}
}
});
function createRequestParams() {
var prms = {};
_$filterForm.serializeArray().map(function (x) { prms[x.name] = x.value; });
return $.extend(prms, _selectedDateRange);
}
$('#ExportExcel').click(function () {
_appService
.getItemsToExcel({})
.done(function (result) {
app.downloadTempFile(result);
});
});
$('#GetItems').click(function (e) {
e.preventDefault();
getItems();
});
function getItems(reload) {
if (reload) {
_$jsTable.jtable('reload');
} else {
_$jsTable.jtable('load', {
filter: $('#InputFilter').val()
});
}
}
getItems();
$('#RefreshAuditLogsButton').click(function (e) {
e.preventDefault();
getAuditLogs();
});
$('#ExportAuditLogsToExcelButton').click(function (e) {
e.preventDefault();
_appService.getAuditLogsToExcel(createRequestParams())
.done(function (result) {
app.downloadTempFile(result);
});
});
$('#ShowAdvancedFiltersSpan').click(function () {
$('#ShowAdvancedFiltersSpan').hide();
$('#HideAdvancedFiltersSpan').show();
$('#AdvacedAuditFiltersArea').slideDown();
});
$('#HideAdvancedFiltersSpan').click(function () {
$('#HideAdvancedFiltersSpan').hide();
$('#ShowAdvancedFiltersSpan').show();
$('#AdvacedAuditFiltersArea').slideUp();
});
_$filterForm.keydown(function (e) {
if (e.which == 13) {
e.preventDefault();
getAuditLogs();
}
});
});
})();
My Service as below
public async Task<PagedResultOutput<PaymentListDto>> GetPaymentForTicketId(int ticketId)
{
var output = _paRepository.GetAll().Where(a => a.TicketId.Equals(ticketId));
var categoryListDtos = output.MapTo<List<PaymentListDto>>();
var menuItemCount = await output.CountAsync();
return new PagedResultOutput<PaymentListDto>(
menuItemCount,
categoryListDtos
);
}
public async Task<PagedResultOutput<TicketListDto>> GetTickets(GetTicketInput input)
{
var tickets = _ticketManager
.GetAll()
.WhereIf(
!input.Filter.IsNullOrEmpty(),
p => p.Restaurant.Name.Contains(input.Filter)
);
var sortTickets = await tickets
.OrderBy(input.Sorting)
.PageBy(input)
.ToListAsync();
var categoryListDtos = sortTickets.MapTo<List<TicketListDto>>();
var menuItemCount = await tickets.CountAsync();
return new PagedResultOutput<TicketListDto>(
menuItemCount,
categoryListDtos
);
}
Hello Sir
I would like you to help on WEB API.
I was trying to get the Users from the link below [http://aspnetzero.com/Documents/Development-Guide#token-based-authentication])
but i am getting following error
{
"success": false,
"result": null,
"error": {
"code": 0,
"message": "No user logged in!",
"details": null,
"validationErrors": null
},
"unAuthorizedRequest": true
}
I have already authenticated users in your previous steps and copied that authorization as well
I have added three attachments for your perusal as well.
Hello Sir
I have done that perfectly. Here is the code for that
function payment_chart() {
abp.ajax({
url: '/Dashboard/paymentChart'
}).done(function (data) {
Morris.Donut({
element: 'payment_stats',
data: $.parseJSON(JSON.stringify(data)),
resize: true
});
});
return JSON.stringify("");
}
payment_chart();