Base solution for your next web application

Activities of "BigCDogCrew"

When I attempt to use the CDN source for DataTables, I get an error. So, I assume AspNetZero has customized its implementation of DataTables (and perhaps missed something with ScrollX?)

@section Styles
{
    <link rel="stylesheet" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css" />
}
@section Scripts
{
    <script src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>
    <script abp-src="/view-resources/Areas/App/Views/Peripherals/Index.js" asp-append-version="true"></script>
}

ScrollX does not appear to work. I'm using AspNetZero v8.6 MVC/jQuery. I am using no custom scripts or css. My sample code and result image are shown below.

What am I doing wrong?

var dataTable = _$peripheralsTable.DataTable({
	scrollX: true,
	paging: true,
	serverSide: true,
	processing: true,
	listAction: {
		ajaxFunction: _peripheralsService.getAll,
		inputFilter: function () {
			return {
				filter: $('#PeripheralsTableFilter').val(),
			};
		}
	},
	columnDefs: [{
		width: 120,
		targets: 0,
		data: null,
		orderable: false,
		autoWidth: false,
		defaultContent: '',
		rowAction: {
			cssClass: 'btn btn-brand dropdown-toggle',
			text: '<i class="fa fa-cog"></i> ' + app.localize('Actions') + ' <span class="caret"></span>',
			items: [
			{
				text: app.localize('View'),
				action: function (data) {
					_viewPeripheralModal.open({ id: data.record.peripheral.id });
				}
			},
			{
				text: app.localize('Edit'),
				visible: function () {
					return _permissions.edit;
				},
				action: function (data) {
					_createOrEditModal.open({ id: data.record.peripheral.id });
				}
			}]
		}
	},
	{
		targets: 1,
		visible: false,
		data: "peripheral.uid",
		name: "uid"   	
	},
	{
		targets: 2,
		data: "peripheral.serialNumber",
		name: "serialNumber"   
	},
	{
		targets: 3,
		data: "peripheral.assetTag",
		name: "assetTag"   
	},
	{
		targets: 4,
		data: "peripheral.firmwareVersion",
		name: "firmwareVersion"
	},
	{
		targets: 5,
		data: "peripheralModelCode" ,
		name: "peripheralModelFk.code" 
	}]
});

What tool did the AspNetZero team use to produce the documentation website? https://docs.aspnetzero.com/en/common/latest

The information in my database is structured like a supply chain. Some, but not all, information that tenants create must be available to other tenants down-stream. I have used the OrganizationUnits to construct the relationships between the tenants. I have also created custom filters that work with the OrganizationUnits, such as IncludeTenantChildren, IncludeTenantParent, IncludeTenantBranch, etc.

As I am now working on the more intricate details of my queries, I am finding that there are many times where an initial table determines what data should be seen by a tenant and then other subsequent tables are included in the query to provide additional details. However, those additional details in those subsequent tables come from data maintained by other tenants. Therefore, I need a simple way to state that the TenantId Filter should be applied only to a specific set (0 or more) of tables in the query and the other tables in the query should be treated as if the TenantId filters have been disabled.

As an example, a tenant may create a Package and then transfer the package to another tenant within their Organization. The TenantId on the Package table gets updated to the new tenant during the transfer process. Now, assume that there are two other tables, PackageContent and PackageTracking which both are linked to Package by PackageId. Data in the PackageContent table should be available only to the creator of the package and the recipient of the package. Data in the PackageTracking table should be available to anyone currently holding tenancy of the package.

So you see...having a TenantId filter that applies to all tables in the query will prevent the package recipient from seeing the PackageContent create by a different tenent. And each tenant will be able to see only the tracking records that they create themselves; not the full tracking history.

What's the best way to selectively apply the TenantId to specific tables (such as Package) and then ignore the TenantId filter on other tables (such as PackageContent and PackageTracking)? It is safe to assume that my custom filters are determining when/if it is appropriate to show PackageContent to the recipient.

How can I access a custom session from the client-side razor script?

I have managed to corrupt some of the files in the metronic folderof my ASP.NET Zero MVC prroject and I want to rebuild the folder structure by downloading the current version (6.0.6).

For the sake of future readers..let's assume that all projects within the ASP.NET Zero solution need to be updated.

What is the process for updating the Metronic template in the MVC project?
Which folders and files do I need to copy from the Metronic ZIP file and into which folders do I place them?

Showing 41 to 46 of 46 entries