mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
fix open pdf and member list
This commit is contained in:
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
||||
import { File, IWriteOptions } from '@awesome-cordova-plugins/file/ngx';
|
||||
import { err, ok, Result } from 'neverthrow';
|
||||
import { FileOpener } from '@awesome-cordova-plugins/file-opener/ngx';
|
||||
import { Logger } from 'src/app/services/logger/main/service';
|
||||
|
||||
|
||||
@Injectable({
|
||||
@@ -29,7 +30,12 @@ export class FileSystemMobileService {
|
||||
const result = await this.file.writeFile(path, fileName, context, { replace: true })
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
console.log('Error writing file', e)
|
||||
Logger.error('Error writing file', {
|
||||
path,
|
||||
fileName,
|
||||
context
|
||||
})
|
||||
console.error('Error writing file', e)
|
||||
return err(e)
|
||||
}
|
||||
}
|
||||
@@ -39,6 +45,10 @@ export class FileSystemMobileService {
|
||||
const result = this.FileOpener.open(filePath, mimetype)
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
Logger.error('Error opening file', {
|
||||
filePath,
|
||||
mimetype
|
||||
})
|
||||
console.error('Error opening file', e)
|
||||
return err(e)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user