mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2024-10-30 01:08:47 +00:00
(comments) Fixed: The word 'data' replaced with 'mock-api' by mistake in the past causing a lot of comments to make no sense
This commit is contained in:
parent
59960af7a5
commit
fd859a8663
|
@ -51,7 +51,7 @@ export class FuseMockApiInterceptor implements HttpInterceptor
|
|||
delay(handler.delay ?? this._defaultDelay ?? 0),
|
||||
switchMap((response) => {
|
||||
|
||||
// If there is no response mock-api,
|
||||
// If there is no response data,
|
||||
// throw an error response
|
||||
if ( !response )
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ export class FuseMockApiInterceptor implements HttpInterceptor
|
|||
return throwError(response);
|
||||
}
|
||||
|
||||
// Parse the response mock-api
|
||||
// Parse the response data
|
||||
const data = {
|
||||
status: response[0],
|
||||
body : response[1]
|
||||
|
|
|
@ -176,7 +176,7 @@ export class ShortcutsComponent implements OnChanges, OnInit, OnDestroy
|
|||
*/
|
||||
save(): void
|
||||
{
|
||||
// Get the mock-api from the form
|
||||
// Get the data from the form
|
||||
const shortcut = this.shortcutForm.value;
|
||||
|
||||
// If there is an id, update it...
|
||||
|
@ -199,7 +199,7 @@ export class ShortcutsComponent implements OnChanges, OnInit, OnDestroy
|
|||
*/
|
||||
delete(): void
|
||||
{
|
||||
// Get the mock-api from the form
|
||||
// Get the data from the form
|
||||
const shortcut = this.shortcutForm.value;
|
||||
|
||||
// Delete
|
||||
|
|
|
@ -217,7 +217,7 @@ export class LayoutComponent implements OnInit, OnDestroy
|
|||
const paths = route.pathFromRoot;
|
||||
paths.forEach((path) => {
|
||||
|
||||
// Check if there is a 'layout' mock-api
|
||||
// Check if there is a 'layout' data
|
||||
if ( path.routeConfig && path.routeConfig.data && path.routeConfig.data.layout )
|
||||
{
|
||||
// Set the layout
|
||||
|
|
|
@ -50,7 +50,7 @@ export class CenteredLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class EnterpriseLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class MaterialLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class ModernLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class ClassicLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class ClassyLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class CompactLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -51,7 +51,7 @@ export class DenseLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class FuturisticLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -50,7 +50,7 @@ export class ThinLayoutComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
ngOnInit(): void
|
||||
{
|
||||
// Subscribe to the resolved route mock-api
|
||||
// Subscribe to the resolved route data
|
||||
this._activatedRoute.data.subscribe((data: Data) => {
|
||||
this.data = data.initialData;
|
||||
});
|
||||
|
|
|
@ -271,7 +271,7 @@ export class CalendarComponent implements OnInit, AfterViewInit, OnDestroy
|
|||
this.viewTitle = this._fullCalendarApi.view.title;
|
||||
|
||||
// Get the view's current start and end dates, add/subtract
|
||||
// 60 days to create a ~150 days period to fetch the mock-api for
|
||||
// 60 days to create a ~150 days period to fetch the data for
|
||||
const viewStart = moment(this._fullCalendarApi.view.currentStart).subtract(60, 'days');
|
||||
const viewEnd = moment(this._fullCalendarApi.view.currentEnd).add(60, 'days');
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ export class CalendarService
|
|||
|
||||
// Return if remaining days is bigger than the number
|
||||
// of days to prefetch. This means we were already been
|
||||
// there and fetched the events mock-api so no need for doing
|
||||
// there and fetched the events data so no need for doing
|
||||
// it again.
|
||||
if ( remainingDays >= this._numberOfDaysToPrefetch )
|
||||
{
|
||||
|
@ -292,7 +292,7 @@ export class CalendarService
|
|||
|
||||
// Return if remaining days is bigger than the number
|
||||
// of days to prefetch. This means we were already been
|
||||
// there and fetched the events mock-api so no need for doing
|
||||
// there and fetched the events data so no need for doing
|
||||
// it again.
|
||||
if ( remainingDays >= this._numberOfDaysToPrefetch )
|
||||
{
|
||||
|
|
|
@ -484,7 +484,7 @@ export class InventoryListComponent implements OnInit, AfterViewInit, OnDestroy
|
|||
}
|
||||
|
||||
/**
|
||||
* Update the selected product using the form mock-api
|
||||
* Update the selected product using the form data
|
||||
*/
|
||||
updateSelectedProduct(): void
|
||||
{
|
||||
|
@ -503,7 +503,7 @@ export class InventoryListComponent implements OnInit, AfterViewInit, OnDestroy
|
|||
}
|
||||
|
||||
/**
|
||||
* Delete the selected product using the form mock-api
|
||||
* Delete the selected product using the form data
|
||||
*/
|
||||
deleteSelectedProduct(): void
|
||||
{
|
||||
|
|
|
@ -122,7 +122,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
|
|||
*/
|
||||
private _generateFoldersMenuLinks(): void
|
||||
{
|
||||
// Reset the folders menu mock-api
|
||||
// Reset the folders menu data
|
||||
this._foldersMenuData = [];
|
||||
|
||||
// Iterate through the folders
|
||||
|
@ -146,11 +146,11 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
|
|||
};
|
||||
}
|
||||
|
||||
// Push the menu item to the folders menu mock-api
|
||||
// Push the menu item to the folders menu data
|
||||
this._foldersMenuData.push(menuItem);
|
||||
});
|
||||
|
||||
// Update the menu mock-api
|
||||
// Update the menu data
|
||||
this._updateMenuData();
|
||||
}
|
||||
|
||||
|
@ -177,7 +177,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
|
|||
});
|
||||
});
|
||||
|
||||
// Update the menu mock-api
|
||||
// Update the menu data
|
||||
this._updateMenuData();
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
|
|||
});
|
||||
});
|
||||
|
||||
// Update the menu mock-api
|
||||
// Update the menu data
|
||||
this._updateMenuData();
|
||||
}
|
||||
|
||||
|
@ -226,12 +226,12 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
|
|||
link : '/apps/mailbox/settings'
|
||||
});
|
||||
|
||||
// Update the menu mock-api
|
||||
// Update the menu data
|
||||
this._updateMenuData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the menu mock-api
|
||||
* Update the menu data
|
||||
*
|
||||
* @private
|
||||
*/
|
||||
|
@ -278,7 +278,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
|
|||
// Get the inbox folder
|
||||
const inboxFolder = this.folders.find(folder => folder.slug === 'inbox');
|
||||
|
||||
// Get the component -> navigation mock-api -> item
|
||||
// Get the component -> navigation data -> item
|
||||
const mainNavigationComponent = this._fuseNavigationService.getComponent<FuseVerticalNavigationComponent>('mainNavigation');
|
||||
|
||||
// If the main navigation component exists...
|
||||
|
|
|
@ -239,7 +239,7 @@ export class DirectoryStructureComponent implements OnInit
|
|||
*/
|
||||
createTree(data): { dataSource: any; treeControl: any }
|
||||
{
|
||||
// Create tree control and mock-api source
|
||||
// Create tree control and data source
|
||||
const treeControl = new FlatTreeControl<FlatDirNode>(node => node.level, node => node.expandable);
|
||||
const dataSource = new MatTreeFlatDataSource(
|
||||
treeControl,
|
||||
|
@ -252,7 +252,7 @@ export class DirectoryStructureComponent implements OnInit
|
|||
node => node.level, node => node.expandable, node => node.children)
|
||||
);
|
||||
|
||||
// Set the mock-api
|
||||
// Set the data
|
||||
dataSource.data = data;
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in New Issue
Block a user