(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:
sercan 2021-05-18 15:18:44 +03:00
parent 59960af7a5
commit fd859a8663
18 changed files with 30 additions and 30 deletions

View File

@ -51,7 +51,7 @@ export class FuseMockApiInterceptor implements HttpInterceptor
delay(handler.delay ?? this._defaultDelay ?? 0), delay(handler.delay ?? this._defaultDelay ?? 0),
switchMap((response) => { switchMap((response) => {
// If there is no response mock-api, // If there is no response data,
// throw an error response // throw an error response
if ( !response ) if ( !response )
{ {
@ -64,7 +64,7 @@ export class FuseMockApiInterceptor implements HttpInterceptor
return throwError(response); return throwError(response);
} }
// Parse the response mock-api // Parse the response data
const data = { const data = {
status: response[0], status: response[0],
body : response[1] body : response[1]

View File

@ -176,7 +176,7 @@ export class ShortcutsComponent implements OnChanges, OnInit, OnDestroy
*/ */
save(): void save(): void
{ {
// Get the mock-api from the form // Get the data from the form
const shortcut = this.shortcutForm.value; const shortcut = this.shortcutForm.value;
// If there is an id, update it... // If there is an id, update it...
@ -199,7 +199,7 @@ export class ShortcutsComponent implements OnChanges, OnInit, OnDestroy
*/ */
delete(): void delete(): void
{ {
// Get the mock-api from the form // Get the data from the form
const shortcut = this.shortcutForm.value; const shortcut = this.shortcutForm.value;
// Delete // Delete

View File

@ -217,7 +217,7 @@ export class LayoutComponent implements OnInit, OnDestroy
const paths = route.pathFromRoot; const paths = route.pathFromRoot;
paths.forEach((path) => { 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 ) if ( path.routeConfig && path.routeConfig.data && path.routeConfig.data.layout )
{ {
// Set the layout // Set the layout

View File

@ -50,7 +50,7 @@ export class CenteredLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class EnterpriseLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class MaterialLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class ModernLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class ClassicLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class ClassyLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class CompactLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -51,7 +51,7 @@ export class DenseLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class FuturisticLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -50,7 +50,7 @@ export class ThinLayoutComponent implements OnInit, OnDestroy
*/ */
ngOnInit(): void ngOnInit(): void
{ {
// Subscribe to the resolved route mock-api // Subscribe to the resolved route data
this._activatedRoute.data.subscribe((data: Data) => { this._activatedRoute.data.subscribe((data: Data) => {
this.data = data.initialData; this.data = data.initialData;
}); });

View File

@ -271,7 +271,7 @@ export class CalendarComponent implements OnInit, AfterViewInit, OnDestroy
this.viewTitle = this._fullCalendarApi.view.title; this.viewTitle = this._fullCalendarApi.view.title;
// Get the view's current start and end dates, add/subtract // 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 viewStart = moment(this._fullCalendarApi.view.currentStart).subtract(60, 'days');
const viewEnd = moment(this._fullCalendarApi.view.currentEnd).add(60, 'days'); const viewEnd = moment(this._fullCalendarApi.view.currentEnd).add(60, 'days');

View File

@ -265,7 +265,7 @@ export class CalendarService
// Return if remaining days is bigger than the number // Return if remaining days is bigger than the number
// of days to prefetch. This means we were already been // 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. // it again.
if ( remainingDays >= this._numberOfDaysToPrefetch ) if ( remainingDays >= this._numberOfDaysToPrefetch )
{ {
@ -292,7 +292,7 @@ export class CalendarService
// Return if remaining days is bigger than the number // Return if remaining days is bigger than the number
// of days to prefetch. This means we were already been // 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. // it again.
if ( remainingDays >= this._numberOfDaysToPrefetch ) if ( remainingDays >= this._numberOfDaysToPrefetch )
{ {

View File

@ -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 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 deleteSelectedProduct(): void
{ {

View File

@ -122,7 +122,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
*/ */
private _generateFoldersMenuLinks(): void private _generateFoldersMenuLinks(): void
{ {
// Reset the folders menu mock-api // Reset the folders menu data
this._foldersMenuData = []; this._foldersMenuData = [];
// Iterate through the folders // 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); this._foldersMenuData.push(menuItem);
}); });
// Update the menu mock-api // Update the menu data
this._updateMenuData(); this._updateMenuData();
} }
@ -177,7 +177,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
}); });
}); });
// Update the menu mock-api // Update the menu data
this._updateMenuData(); this._updateMenuData();
} }
@ -207,7 +207,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
}); });
}); });
// Update the menu mock-api // Update the menu data
this._updateMenuData(); this._updateMenuData();
} }
@ -226,12 +226,12 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
link : '/apps/mailbox/settings' link : '/apps/mailbox/settings'
}); });
// Update the menu mock-api // Update the menu data
this._updateMenuData(); this._updateMenuData();
} }
/** /**
* Update the menu mock-api * Update the menu data
* *
* @private * @private
*/ */
@ -278,7 +278,7 @@ export class MailboxSidebarComponent implements OnInit, OnDestroy
// Get the inbox folder // Get the inbox folder
const inboxFolder = this.folders.find(folder => folder.slug === 'inbox'); 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'); const mainNavigationComponent = this._fuseNavigationService.getComponent<FuseVerticalNavigationComponent>('mainNavigation');
// If the main navigation component exists... // If the main navigation component exists...

View File

@ -239,7 +239,7 @@ export class DirectoryStructureComponent implements OnInit
*/ */
createTree(data): { dataSource: any; treeControl: any } 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 treeControl = new FlatTreeControl<FlatDirNode>(node => node.level, node => node.expandable);
const dataSource = new MatTreeFlatDataSource( const dataSource = new MatTreeFlatDataSource(
treeControl, treeControl,
@ -252,7 +252,7 @@ export class DirectoryStructureComponent implements OnInit
node => node.level, node => node.expandable, node => node.children) node => node.level, node => node.expandable, node => node.children)
); );
// Set the mock-api // Set the data
dataSource.data = data; dataSource.data = data;
return { return {