@fluxhub/fluxhub-lib 1.0.375 → 1.0.377
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/fluxhub-fluxhub-lib.umd.js +64 -2
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/controls/fhupload.js +78 -5
- package/esm5/lib/controls/fhupload.js +77 -3
- package/fesm2015/fluxhub-fluxhub-lib.js +65 -4
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +64 -2
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/fluxhub-fluxhub-lib.metadata.json +1 -1
- package/lib/controls/fhupload.d.ts +4 -1
- package/package.json +1 -1
|
@@ -2741,6 +2741,7 @@ class FHUploadComponent {
|
|
|
2741
2741
|
this.lista_allegati = [];
|
|
2742
2742
|
this.change = new EventEmitter();
|
|
2743
2743
|
this.upload_ended = new EventEmitter();
|
|
2744
|
+
this.allow_delete = false;
|
|
2744
2745
|
this.loading = false;
|
|
2745
2746
|
this.App = '';
|
|
2746
2747
|
this.K = '';
|
|
@@ -2756,6 +2757,7 @@ class FHUploadComponent {
|
|
|
2756
2757
|
url: this.app_s.API_ENDPOINT + this.app_s.UPLOAD_ENDPOINT,
|
|
2757
2758
|
'maxFileSize': 500 * 1024 * 1024
|
|
2758
2759
|
});
|
|
2760
|
+
this.id = null;
|
|
2759
2761
|
this.username = this.app_s.user;
|
|
2760
2762
|
this.uploader.onBeforeUploadItem = (/**
|
|
2761
2763
|
* @param {?} item
|
|
@@ -2783,6 +2785,57 @@ class FHUploadComponent {
|
|
|
2783
2785
|
}
|
|
2784
2786
|
});
|
|
2785
2787
|
}
|
|
2788
|
+
/**
|
|
2789
|
+
* @return {?}
|
|
2790
|
+
*/
|
|
2791
|
+
del_doc() {
|
|
2792
|
+
localStorage.setItem(this.app_s.COMPANY_KEY + "title_dialog", 'Conferma Operazione');
|
|
2793
|
+
localStorage.setItem(this.app_s.COMPANY_KEY + "msg_dialog", "Confermi l'eliminazione dell'elemento?");
|
|
2794
|
+
/** @type {?} */
|
|
2795
|
+
let dialogRef = this
|
|
2796
|
+
.dialog
|
|
2797
|
+
.open(FHConfirmComponent);
|
|
2798
|
+
dialogRef
|
|
2799
|
+
.afterClosed()
|
|
2800
|
+
.subscribe((/**
|
|
2801
|
+
* @param {?} result
|
|
2802
|
+
* @return {?}
|
|
2803
|
+
*/
|
|
2804
|
+
result => {
|
|
2805
|
+
if (result) {
|
|
2806
|
+
/** @type {?} */
|
|
2807
|
+
let p = new QParam();
|
|
2808
|
+
p.sql = "DELETE_ALLEGATO";
|
|
2809
|
+
p.types = ['int', 'string'];
|
|
2810
|
+
p.values = [this.id, this.app_s.user];
|
|
2811
|
+
this
|
|
2812
|
+
._dataService
|
|
2813
|
+
.doQuery(p)
|
|
2814
|
+
.subscribe((/**
|
|
2815
|
+
* @param {?} data
|
|
2816
|
+
* @return {?}
|
|
2817
|
+
*/
|
|
2818
|
+
data => {
|
|
2819
|
+
if (data != null)
|
|
2820
|
+
if (data.result_msg == "OK") {
|
|
2821
|
+
// this.arr_g = data.result_data;
|
|
2822
|
+
this.ref_allegato();
|
|
2823
|
+
this
|
|
2824
|
+
.toastr
|
|
2825
|
+
.info("INFO", "ALLEGATO ELIMINATO", {
|
|
2826
|
+
timeOut: 1000,
|
|
2827
|
+
progressBar: true
|
|
2828
|
+
});
|
|
2829
|
+
}
|
|
2830
|
+
}), (/**
|
|
2831
|
+
* @param {?} err
|
|
2832
|
+
* @return {?}
|
|
2833
|
+
*/
|
|
2834
|
+
err => {
|
|
2835
|
+
}));
|
|
2836
|
+
}
|
|
2837
|
+
}));
|
|
2838
|
+
}
|
|
2786
2839
|
/**
|
|
2787
2840
|
* @return {?}
|
|
2788
2841
|
*/
|
|
@@ -2906,9 +2959,10 @@ class FHUploadComponent {
|
|
|
2906
2959
|
* @param {?} p_label
|
|
2907
2960
|
* @param {?=} p_tipo
|
|
2908
2961
|
* @param {?=} programma_da_eseguire
|
|
2962
|
+
* @param {?=} allow_delete
|
|
2909
2963
|
* @return {?}
|
|
2910
2964
|
*/
|
|
2911
|
-
init(p_app, p_k, p_label, p_tipo = "", programma_da_eseguire = "") {
|
|
2965
|
+
init(p_app, p_k, p_label, p_tipo = "", programma_da_eseguire = "", allow_delete = false) {
|
|
2912
2966
|
this.App = p_app;
|
|
2913
2967
|
this.K = p_k;
|
|
2914
2968
|
this.label = p_label;
|
|
@@ -2917,6 +2971,7 @@ class FHUploadComponent {
|
|
|
2917
2971
|
this.b_edit_loaded = false;
|
|
2918
2972
|
this.descrizione = "";
|
|
2919
2973
|
this.programma_da_eseguire = programma_da_eseguire;
|
|
2974
|
+
this.allow_delete = allow_delete;
|
|
2920
2975
|
this.ref_allegato();
|
|
2921
2976
|
}
|
|
2922
2977
|
/**
|
|
@@ -2944,6 +2999,7 @@ class FHUploadComponent {
|
|
|
2944
2999
|
/** @type {?} */
|
|
2945
3000
|
let a = data.result_data;
|
|
2946
3001
|
if (a.length > 0) {
|
|
3002
|
+
this.id = a[0].id;
|
|
2947
3003
|
this.descrizione = a[0].descrizione;
|
|
2948
3004
|
this.file_name = a[0].Filename;
|
|
2949
3005
|
this.label_b = "" + a[0].Filename + " - " + a[0].Filesize + "";
|
|
@@ -2971,12 +3027,17 @@ FHUploadComponent.decorators = [
|
|
|
2971
3027
|
<input type="file" multiple ng2FileSelect [uploader]="uploader" name="file-fh{{App}}" id="file-fh{{App}}" class="inputfile inputfile-fh" />
|
|
2972
3028
|
<label for="file-fh{{App}}" style="width:210px"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="17" viewBox="0 0 20 17"><path d="M10 0l-5.2 4.9h3.3v5.1h3.8v-5.1h3.3l-5.2-4.9zm9.3 11.5l-3.2-2.1h-2l3.4 2.6h-3.5c-.1 0-.2.1-.2.1l-.8 2.3h-6l-.8-2.2c-.1-.1-.1-.2-.2-.2h-3.6l3.4-2.6h-2l-3.2 2.1c-.4.3-.7 1-.6 1.5l.6 3.1c.1.5.7.9 1.2.9h16.3c.6 0 1.1-.4 1.3-.9l.6-3.1c.1-.5-.2-1.2-.7-1.5z"/></svg><span style="font-size: 12px"> Upload</span></label>
|
|
2973
3029
|
</div>
|
|
2974
|
-
<div fxLayout="row" fxLayoutAlign="start start">
|
|
2975
|
-
<button mat-raised-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px">{{label_b}}</button
|
|
3030
|
+
<div fxLayout="row" fxLayoutAlign="start start">{{allow_delete}} {{id}}
|
|
3031
|
+
<button mat-raised-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px">{{label_b}}</button>
|
|
3032
|
+
<button mat-raised-button *ngIf="id!=null && allow_delete" (click)="del_doc()" color="warn">
|
|
3033
|
+
<mat-icon>delete</mat-icon>
|
|
3034
|
+
</button>
|
|
2976
3035
|
</div>
|
|
2977
3036
|
</div>
|
|
2978
|
-
<div *ngIf="!enabled">
|
|
3037
|
+
<div *ngIf="!enabled" fxLayout="row">
|
|
2979
3038
|
<label>{{label}}:</label>{{descrizione}}
|
|
3039
|
+
<button mat-raised-button *ngIf="b_edit_loaded" (click)="download_all()" style="font-size: 12px">{{label_b}}</button>
|
|
3040
|
+
|
|
2980
3041
|
</div>
|
|
2981
3042
|
<div *ngIf="!b_ini" style="color:#ff0000"><b>ATTENZIONE COMPONENTE NON INIZIALIZZATO</b></div>
|
|
2982
3043
|
`,
|