mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix commit to hub
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PublicationFormMVService } from './publication-form-mv.service';
|
||||
|
||||
describe('PublicationFormMVService', () => {
|
||||
let service: PublicationFormMVService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(PublicationFormMVService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PublicationFormMVService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import { ObjectMergeNotification } from 'src/app/services/socket-connection-mcr.
|
||||
import { CMAPIService } from "src/app/shared/repository/CMAPI/cmapi.service"
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
|
||||
const objectMergeNotification = new ObjectMergeNotification()
|
||||
|
||||
|
||||
export enum UploadError {
|
||||
noConnection = 'noConnection',
|
||||
@@ -192,10 +192,10 @@ export class PublicationFormMV {
|
||||
|
||||
private UploadFileUseCase = new UploadFileUseCase()
|
||||
private form = new PublicationFormModel()
|
||||
ObjectMergeNotification = objectMergeNotification
|
||||
ObjectMergeNotification = new ObjectMergeNotification()
|
||||
|
||||
constructor() {
|
||||
this.ObjectMergeNotification.connect();
|
||||
// this.ObjectMergeNotification.connect();
|
||||
}
|
||||
|
||||
setDataToFrom(data: IPublicationFormModelEntity) {
|
||||
@@ -218,11 +218,11 @@ export class PublicationFormMV {
|
||||
PublicationAttachmentEntity.setChunkManger(fileChunks)
|
||||
|
||||
PublicationAttachmentEntity.chucksManager.registerOnLastChunk(() => {
|
||||
this.ObjectMergeNotification.socket.commit(PublicationAttachmentEntity.chucksManager.path)
|
||||
|
||||
const guid = PublicationAttachmentEntity.chucksManager.path
|
||||
|
||||
this.ObjectMergeNotification.subscribe(guid, (data) => {
|
||||
// console.log("data", data)
|
||||
PublicationAttachmentEntity
|
||||
resolve(true)
|
||||
})
|
||||
@@ -437,7 +437,7 @@ export class ChucksManager {
|
||||
}
|
||||
|
||||
registerOnLastChunk(a: Function) {
|
||||
this.onSetPath.push(a)
|
||||
this.onSetLastChunk.push(a)
|
||||
}
|
||||
|
||||
registerToUseCaseResponse(a: Function) {
|
||||
|
||||
Reference in New Issue
Block a user