mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix go back
This commit is contained in:
@@ -34,7 +34,7 @@ import { environment } from 'src/environments/environment';
|
||||
import { RoleIdService } from 'src/app/services/role-id.service'
|
||||
import { EventListStore } from 'src/app/models/agenda/AgendaEventList';
|
||||
import { ContactsService } from 'src/app/services/contacts.service';
|
||||
|
||||
import { Cy } from 'cypress/enum'
|
||||
@Component({
|
||||
selector: 'app-agenda',
|
||||
templateUrl: './agenda.page.html',
|
||||
@@ -63,6 +63,7 @@ export class AgendaPage implements OnInit {
|
||||
contacts: EventPerson[]
|
||||
|
||||
todayDateFormated: string;
|
||||
Cy = Cy
|
||||
|
||||
setView(view: CalendarView) {
|
||||
this.view = view;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
</div>
|
||||
</ion-item>
|
||||
<div class="d-flex pt-25">
|
||||
<button class="btn-ok btn-login" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar a sessão</button>
|
||||
<button class="btn-ok btn-login {{ Cy.p.login.b.enter }}" fill="clear" expand="block" shape="round" (click)="Login()">Iniciar a sessão</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="msg-bottom d-flex">
|
||||
|
||||
@@ -22,6 +22,7 @@ import { Storage } from '@ionic/storage';
|
||||
import { CPSession } from 'src/app/store/documentManagement';
|
||||
import { StorageService } from 'src/app/services/storage.service';
|
||||
import { DeviceService } from 'src/app/services/device.service'
|
||||
import { Cy } from 'cypress/enum'
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.page.html',
|
||||
@@ -41,6 +42,7 @@ export class LoginPage implements OnInit {
|
||||
sessionStore = SessionStore;
|
||||
showPassword = false;
|
||||
passwordIcon = "eye";
|
||||
Cy = Cy
|
||||
|
||||
constructor(
|
||||
private notificatinsservice: NotificationsService,
|
||||
|
||||
@@ -39,6 +39,7 @@ import { PublicationFromMvService } from "src/app/shared/publication/upload/publ
|
||||
import { File } from '../../../models/chatMethod';
|
||||
import { CropImagePage } from 'src/app/modals/crop-image/crop-image.page';
|
||||
|
||||
|
||||
const config = {
|
||||
quality: 0.5,
|
||||
maxWidth: 800,
|
||||
@@ -142,6 +143,8 @@ export class NewPublicationPage implements OnInit {
|
||||
private router: Router,
|
||||
private videoconvertService: VideoconvertService,
|
||||
public PublicationFromMvService: PublicationFromMvService,
|
||||
public publicationFolderService: PublicationFolderService,
|
||||
|
||||
) {
|
||||
this.PublicationFromMvService.clear()
|
||||
|
||||
@@ -407,9 +410,37 @@ export class NewPublicationPage implements OnInit {
|
||||
|
||||
|
||||
close() {
|
||||
this.modalController.dismiss(this.PublicationFromMvService.form).then(() => {
|
||||
this.showLoader = true;
|
||||
});
|
||||
if (window["sharedContent"]) {
|
||||
|
||||
if (this.platform.is('android')) {
|
||||
window["sharedContent"] = null;
|
||||
|
||||
this.publicationFolderService.gotoAction = this.folderId;
|
||||
|
||||
this.modalController.dismiss({}).then(() => {
|
||||
if(this.platform.is('tablet')) {
|
||||
this.router.navigate(['/home/publications'])
|
||||
} else {
|
||||
this.router.navigate(['/home/publications', this.folderId])
|
||||
}
|
||||
});
|
||||
} else {
|
||||
window["sharedContent"] = null;
|
||||
this.publicationFolderService.gotoAction = this.folderId;
|
||||
|
||||
this.modalController.dismiss({}).then(() => {
|
||||
if(this.platform.is('tablet')) {
|
||||
this.router.navigate(['/home/publications'])
|
||||
} else {
|
||||
this.router.navigate(['/home/publications', this.folderId])
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
} else {
|
||||
this.modalController.dismiss({}).then(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
cancel() {
|
||||
@@ -694,6 +725,8 @@ export class NewPublicationPage implements OnInit {
|
||||
}
|
||||
)
|
||||
|
||||
newAttachment.needUpload()
|
||||
|
||||
this.PublicationFromMvService.form.Files.push(newAttachment)
|
||||
|
||||
const deleteSecretFile = async () => {
|
||||
@@ -741,6 +774,8 @@ export class NewPublicationPage implements OnInit {
|
||||
OriginalFileName: 'load video'
|
||||
}
|
||||
)
|
||||
|
||||
newAttachment.needUpload()
|
||||
this.PublicationFromMvService.form.Files.push(newAttachment)
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import { NewPublicationPage } from './new-publication/new-publication.page';
|
||||
import { ChunkService } from 'src/app/services/stream/chunk.service'
|
||||
import { StreamService } from 'src/app/services/stream/stream.service'
|
||||
import { HttpClient, HttpHeaders, HttpEventType } from '@angular/common/http';
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service';
|
||||
|
||||
// import { ActionModel } from 'src/app/models/beast-orm';
|
||||
|
||||
@@ -77,6 +78,7 @@ export class PublicationsPage implements OnInit {
|
||||
private ChunkService: ChunkService,
|
||||
private StreamService:StreamService,
|
||||
private http: HttpClient,
|
||||
public publicationFolderService: PublicationFolderService,
|
||||
|
||||
|
||||
) {
|
||||
@@ -86,19 +88,21 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
console.log('shared recived', this.intent)
|
||||
|
||||
window['goToPublicationsList'] = this.goToPublicationsList
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
checkQueryParameter() {
|
||||
var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
var folderId = urlSearchParams.get('folderId');
|
||||
// var urlSearchParams = new URLSearchParams(window.location.search);
|
||||
|
||||
if (folderId !== null && window["openFolder"]) {
|
||||
window["openFolder"] = false
|
||||
// var folderId = urlSearchParams.get('folderId');
|
||||
if (this.publicationFolderService.gotoAction) {
|
||||
const folderId = this.publicationFolderService.gotoAction
|
||||
this.goToPublicationsList(folderId)
|
||||
this.publicationFolderService.gotoAction = false
|
||||
} else {
|
||||
console.log('Folder ID::', folderId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,6 +114,7 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
this.router.events.forEach((event) => {
|
||||
if (event instanceof NavigationEnd && event.url == pathname) {
|
||||
console.log('=================', this.publicationFolderService.gotoAction)
|
||||
this.getActions();
|
||||
this.checkQueryParameter()
|
||||
}
|
||||
@@ -377,11 +382,13 @@ export class PublicationsPage implements OnInit {
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.doRefresh(event);
|
||||
this.checkQueryParameter();
|
||||
});
|
||||
await modal.present();
|
||||
}
|
||||
|
||||
goToPublicationsList(folderId: string) {
|
||||
goToPublicationsList = (folderId: string) => {
|
||||
console.log('nice', folderId)
|
||||
if(window["sharedContent"]){
|
||||
this.AddPublication('2',folderId,window["sharedContent"])
|
||||
return
|
||||
|
||||
@@ -10,13 +10,15 @@ import { DeplomasStore } from '../store/deplomas.service';
|
||||
import { CalendarStore } from 'src/app/store/calendar.service';
|
||||
import { ToDayEventStorage } from '../store/to-day-event-storage.service';
|
||||
import { TotalDocumentStore } from 'src/app/store/total-document.service';
|
||||
|
||||
import { PublicationFolderService } from 'src/app/store/publication-folder.service'
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ClearStoreService {
|
||||
|
||||
constructor() { }
|
||||
constructor(
|
||||
private PublicationFolderService: PublicationFolderService
|
||||
) { }
|
||||
|
||||
clear() {
|
||||
|
||||
@@ -37,6 +39,7 @@ export class ClearStoreService {
|
||||
CalendarStore.ResetList([])
|
||||
ToDayEventStorage.reset([])
|
||||
TotalDocumentStore.resetCount(0)
|
||||
this.PublicationFolderService.clear()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,19 +246,10 @@ export class PublicationFromMvService {
|
||||
if (window["sharedContent"]) {
|
||||
|
||||
if (this.platform.is('android')) {
|
||||
window["sharedContent"] = null
|
||||
this.modalController.dismiss(this.form).then(() => {
|
||||
this.router.navigate(['/home/publications', this.folderId])
|
||||
});
|
||||
window["sharedContent"] = null;
|
||||
} else {
|
||||
window["sharedContent"] = null
|
||||
this.modalController.dismiss(this.form).then(() => {
|
||||
this.router.navigate(['/home/publications', this.folderId])
|
||||
});
|
||||
|
||||
window["sharedContent"] = null;
|
||||
}
|
||||
} else {
|
||||
this.modalController.dismiss(this.form).then(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,12 +21,26 @@ export class PublicationFolderService {
|
||||
publicationPipe = new PublicationPipe()
|
||||
getpublication = [];
|
||||
|
||||
gotoAction: string | false
|
||||
|
||||
|
||||
constructor(
|
||||
private storage: Storage,
|
||||
private publications: PublicationsService,
|
||||
) { }
|
||||
|
||||
clear() {
|
||||
this.publicationList = {};
|
||||
this.FolderDetails = {};
|
||||
|
||||
this.restoreFolder = {}
|
||||
|
||||
this.showLoader = true
|
||||
this.publicationPipe = new PublicationPipe()
|
||||
this.getpublication = [];
|
||||
|
||||
}
|
||||
|
||||
|
||||
createPublicationList(folderId) {
|
||||
if (!this.publicationList[folderId]) {
|
||||
|
||||
@@ -4,4 +4,4 @@ import { environment as oaprProd } from './suport/oapr'
|
||||
import { DevDev } from './suport/dev'
|
||||
|
||||
|
||||
export const environment: Environment = oaprProd;
|
||||
export const environment: Environment = DevDev;
|
||||
|
||||
Reference in New Issue
Block a user