mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-4875] Fix imports path
This commit is contained in:
@@ -8,7 +8,7 @@ import { NotificationsService } from '../../shared/notifications/notifications.s
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { CoreState } from '../core.reducers';
|
import { CoreState } from '../core.reducers';
|
||||||
import { DSOChangeAnalyzer } from 'src/app/core/data/dso-change-analyzer.service';
|
import { DSOChangeAnalyzer } from '../data/dso-change-analyzer.service';
|
||||||
import { Feedback } from './models/feedback.model';
|
import { Feedback } from './models/feedback.model';
|
||||||
|
|
||||||
describe('FeedbackDataService', () => {
|
describe('FeedbackDataService', () => {
|
||||||
@@ -85,16 +85,4 @@ describe('FeedbackDataService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
describe('createFeedback', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
spyOn(service, 'create');
|
|
||||||
service.createFeedback(feedbackPayload);
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should call postToEndpoint with the payload', () => {
|
|
||||||
expect(service.create).toHaveBeenCalledWith(feedbackPayload);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -3,17 +3,16 @@ import { Observable } from 'rxjs';
|
|||||||
import { DataService } from '../data/data.service';
|
import { DataService } from '../data/data.service';
|
||||||
import { Feedback } from './models/feedback.model';
|
import { Feedback } from './models/feedback.model';
|
||||||
import { FEEDBACK } from './models/feedback.resource-type';
|
import { FEEDBACK } from './models/feedback.resource-type';
|
||||||
import { dataService } from 'src/app/core/cache/builders/build-decorators';
|
import { dataService } from '../cache/builders/build-decorators';
|
||||||
import { RequestService } from 'src/app/core/data/request.service';
|
import { RequestService } from '../data/request.service';
|
||||||
import { RemoteDataBuildService } from 'src/app/core/cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { ObjectCacheService } from 'src/app/core/cache/object-cache.service';
|
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||||
import { HALEndpointService } from 'src/app/core/shared/hal-endpoint.service';
|
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||||
import { NotificationsService } from 'src/app/shared/notifications/notifications.service';
|
import { NotificationsService } from '../../shared/notifications/notifications.service';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { DSOChangeAnalyzer } from 'src/app/core/data/dso-change-analyzer.service';
|
import { DSOChangeAnalyzer } from '../data/dso-change-analyzer.service';
|
||||||
import { getFirstSucceededRemoteData, getRemoteDataPayload } from 'src/app/core/shared/operators';
|
import { getFirstSucceededRemoteData, getRemoteDataPayload } from '../shared/operators';
|
||||||
import { RemoteData } from 'src/app/core/data/remote-data';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Service for checking and managing the feedback
|
* Service for checking and managing the feedback
|
||||||
@@ -47,15 +46,4 @@ export class FeedbackDataService extends DataService<Feedback> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create feedback
|
|
||||||
* @param payload feedback to be sent
|
|
||||||
* @return Observable<RemoteData<Feedback>
|
|
||||||
* server response
|
|
||||||
*/
|
|
||||||
createFeedback(payload: Feedback): Observable<RemoteData<Feedback>> {
|
|
||||||
return this.create(payload);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router';
|
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { AuthorizationDataService } from '../data/feature-authorization/authorization-data.service';
|
import { AuthorizationDataService } from '../data/feature-authorization/authorization-data.service';
|
||||||
import { FeatureID } from 'src/app/core/data/feature-authorization/feature-id';
|
import { FeatureID } from '../data/feature-authorization/feature-id';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -6,5 +6,4 @@ import { ResourceType } from '../../shared/resource-type';
|
|||||||
* Needs to be in a separate file to prevent circular
|
* Needs to be in a separate file to prevent circular
|
||||||
* dependencies in webpack.
|
* dependencies in webpack.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const FEEDBACK = new ResourceType('feedback');
|
export const FEEDBACK = new ResourceType('feedback');
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
<input class="form-control" formControlName="page" name="page" type="hidden" [value]="routeService.getPreviousUrl() | async"
|
<input class="form-control" formControlName="page" name="page" type="hidden" [value]="routeService.getPreviousUrl() | async"
|
||||||
/>
|
/>
|
||||||
<div class="row py-2">
|
<div class="row py-2">
|
||||||
<div class="control-group col-sm-12">
|
<div class="control-group col-sm-12 text-right">
|
||||||
<button [disabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
<button [disabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -3,16 +3,16 @@ import { FeedbackDataService } from '../../../core/feedback/feedback-data.servic
|
|||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { FeedbackFormComponent } from './feedback-form.component';
|
import { FeedbackFormComponent } from './feedback-form.component';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { NO_ERRORS_SCHEMA, DebugElement } from '@angular/core';
|
import { DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { RouteService } from 'src/app/core/services/route.service';
|
import { RouteService } from '../../../core/services/route.service';
|
||||||
import { routeServiceStub } from 'src/app/shared/testing/route-service.stub';
|
import { routeServiceStub } from '../../../shared/testing/route-service.stub';
|
||||||
import { FormBuilder } from '@angular/forms';
|
import { FormBuilder } from '@angular/forms';
|
||||||
import { NotificationsService } from 'src/app/shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { NotificationsServiceStub } from 'src/app/shared/testing/notifications-service.stub';
|
import { NotificationsServiceStub } from '../../../shared/testing/notifications-service.stub';
|
||||||
import { AuthService } from 'src/app/core/auth/auth.service';
|
import { AuthService } from '../../../core/auth/auth.service';
|
||||||
import { AuthServiceStub } from 'src/app/shared/testing/auth-service.stub';
|
import { AuthServiceStub } from '../../../shared/testing/auth-service.stub';
|
||||||
import { of } from 'rxjs/internal/observable/of';
|
import { of } from 'rxjs';
|
||||||
import { Feedback } from '../../../core/feedback/models/feedback.model';
|
import { Feedback } from '../../../core/feedback/models/feedback.model';
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2,11 +2,11 @@ import { RemoteData } from '../../../core/data/remote-data';
|
|||||||
import { NoContent } from '../../../core/shared/NoContent.model';
|
import { NoContent } from '../../../core/shared/NoContent.model';
|
||||||
import { FeedbackDataService } from '../../../core/feedback/feedback-data.service';
|
import { FeedbackDataService } from '../../../core/feedback/feedback-data.service';
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { RouteService } from 'src/app/core/services/route.service';
|
import { RouteService } from '../../../core/services/route.service';
|
||||||
import { FormBuilder, Validators } from '@angular/forms';
|
import { FormBuilder, Validators } from '@angular/forms';
|
||||||
import { NotificationsService } from 'src/app/shared/notifications/notifications.service';
|
import { NotificationsService } from '../../../shared/notifications/notifications.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { AuthService } from 'src/app/core/auth/auth.service';
|
import { AuthService } from '../../../core/auth/auth.service';
|
||||||
import { EPerson } from '../../../core/eperson/models/eperson.model';
|
import { EPerson } from '../../../core/eperson/models/eperson.model';
|
||||||
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
import { getFirstCompletedRemoteData } from '../../../core/shared/operators';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user