mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
add
This commit is contained in:
@@ -96,17 +96,6 @@ async getIconGallery(){
|
||||
openChatVideo(){
|
||||
|
||||
}
|
||||
deleteImage(){
|
||||
document.addEventListener('DOMContentLoaded', ()=>{
|
||||
document.querySelector('img').addEventListener('click',removeImage)
|
||||
})
|
||||
function removeImage(ev){
|
||||
let img = ev.currentTarget
|
||||
let src = ev.target.closest('.img')
|
||||
src?.parentElement.removeChild(src)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async getIconShare(){
|
||||
|
||||
@@ -6,7 +6,7 @@ function prefix() {
|
||||
return environment.version.lastCommitNumber + environment.id+"-";
|
||||
}
|
||||
|
||||
export function GET({key, localStorage, instance}) {
|
||||
export function GET({key, instance}) {
|
||||
if(environment.storageProduction) {
|
||||
|
||||
try {
|
||||
@@ -26,7 +26,8 @@ export function GET({key, localStorage, instance}) {
|
||||
}
|
||||
|
||||
} else {
|
||||
const restoredData = JSON.parse(localStorage.getItem(prefix() + key))
|
||||
const newKey = prefix() + key
|
||||
const restoredData = JSON.parse(localStorage.getItem(newKey))
|
||||
Object.assign(instance, restoredData);
|
||||
|
||||
return restoredData
|
||||
@@ -34,7 +35,7 @@ export function GET({key, localStorage, instance}) {
|
||||
|
||||
}
|
||||
|
||||
export function SAVE({key, localStorage, instance, dataToSave}) {
|
||||
export function SAVE({key, instance, dataToSave}) {
|
||||
if(environment.storageProduction) {
|
||||
const newKey = prefix() + SHA1(key).toString()
|
||||
const stringifyData = JSON.stringify(dataToSave)
|
||||
@@ -45,16 +46,19 @@ export function SAVE({key, localStorage, instance, dataToSave}) {
|
||||
|
||||
} else {
|
||||
const stringifyData = JSON.stringify(dataToSave)
|
||||
localStorage.setItem(prefix() + key, stringifyData)
|
||||
const newKey = prefix() + key
|
||||
|
||||
localStorage.setItem(newKey, stringifyData)
|
||||
}
|
||||
}
|
||||
|
||||
export function DELETE({key, localStorage, instance}) {
|
||||
export function DELETE({key, instance}) {
|
||||
if(environment.storageProduction) {
|
||||
const newKey = prefix() + SHA1(key).toString()
|
||||
localStorage.removeItem(newKey)
|
||||
|
||||
} else {
|
||||
localStorage.removeItem(prefix() + key)
|
||||
const newKey = prefix() + key
|
||||
localStorage.removeItem(newKey)
|
||||
}
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
<div class="bottom-content width-100">
|
||||
<ion-list>
|
||||
<h5 class="font-17-rem">Documentos Anexados</h5>
|
||||
<h5 >Documentos Anexados</h5>
|
||||
<ion-item *ngFor="let attachment of mergedArray"
|
||||
class="ion-no-margin ion-no-padding cursor-pointer"
|
||||
>
|
||||
|
||||
@@ -198,14 +198,6 @@ export class GabineteDigitalPage implements OnInit {
|
||||
|
||||
this.hideRefreshButton();
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
// We can access the TestComponent now that this portion of the view tree has been initiated.
|
||||
const element = this.scroll.nativeElement
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
|
||||
|
||||
(async () => {
|
||||
@@ -245,6 +237,15 @@ export class GabineteDigitalPage implements OnInit {
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
// We can access the TestComponent now that this portion of the view tree has been initiated.
|
||||
this.scroll.nativeElement.addEventListener("scroll", (e)=> {
|
||||
this.changeTab()
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -118,8 +118,7 @@ export class AuthService {
|
||||
|
||||
if(saveSession) {
|
||||
/* this.SetSession(response, user) */
|
||||
console.log('teste', response);
|
||||
CPSession.save(response)
|
||||
return response
|
||||
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
@@ -14,8 +14,6 @@ export class LoggingInterceptorService {
|
||||
) {}
|
||||
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler) {
|
||||
const started = Date.now();
|
||||
let ok: string;
|
||||
|
||||
// extend server response observable with logging
|
||||
return next.handle(req)
|
||||
@@ -24,7 +22,7 @@ export class LoggingInterceptorService {
|
||||
// Succeeds when there is a response; ignore other events
|
||||
next: (event) => {
|
||||
|
||||
ok = event instanceof HttpResponse ? 'succeeded' : ''
|
||||
const ok = event instanceof HttpResponse ? 'succeeded' : ''
|
||||
|
||||
if(ok == 'succeeded' || (typeof event['status'] == 'number' && event['status'] !=0)) {
|
||||
// set to online
|
||||
@@ -44,11 +42,7 @@ export class LoggingInterceptorService {
|
||||
}
|
||||
}),
|
||||
// Log when response observable either completes or errors
|
||||
finalize(() => {
|
||||
// const elapsed = Date.now() - started;
|
||||
// const msg = `${req.method} "${req.urlWithParams}"
|
||||
// ${ok} in ${elapsed} ms.`;
|
||||
})
|
||||
finalize(() => {})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,9 +47,6 @@ export class AllProcessesPage implements OnInit {
|
||||
ngOnInit() {
|
||||
// this.updateAllProcess()
|
||||
this.checkFilter();
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
|
||||
this.listSubscription = this.TaskService.registerCallback({
|
||||
id: import.meta.url,
|
||||
@@ -59,6 +56,10 @@ export class AllProcessesPage implements OnInit {
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
ngAfterViewInit(): void {
|
||||
|
||||
|
||||
this.dynamicSearch();
|
||||
|
||||
|
||||
@@ -28,4 +28,6 @@ rewriteGet.connect(GET, [CPSession])
|
||||
rewriteSave.connect(SAVE, [CPSession])
|
||||
rewriteDelete.connect(DELETE, [CPSession])
|
||||
// get function
|
||||
|
||||
console.log('get')
|
||||
CPSession.get()
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user