feat: restore
This commit is contained in:
parent
5ab3f98855
commit
604c2e70bd
|
@ -10,7 +10,7 @@ const check = (cwd) => {
|
|||
onlyAllow:
|
||||
'AFLv2.1;Apache 2.0;Apache-2.0;Apache*;Artistic-2.0;0BSD;BSD*;BSD-2-Clause;BSD-3-Clause;CC0-1.0;CC-BY-3.0;CC-BY-4.0;ISC;MIT;MPL-2.0;ODC-By-1.0;Python-2.0;Unlicense;',
|
||||
excludePackages:
|
||||
'@cds/city@1.1.0;@handsontable/angular@13.1.0;handsontable@13.1.0;hyperformula@2.6.2;jackspeak@2.2.0;path-scurry@1.7.0'
|
||||
'@cds/city@1.1.0;@handsontable/angular@13.1.0;handsontable@13.1.0;hyperformula@2.7.0;jackspeak@2.2.0;path-scurry@1.7.0'
|
||||
},
|
||||
(error, json) => {
|
||||
if (error) {
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
<button
|
||||
class="btn btn-sm btn-outline text-center mr-5i"
|
||||
(click)="viewerTableScreen()"
|
||||
[disabled]="revertingChanges"
|
||||
>
|
||||
View base table
|
||||
</button>
|
||||
|
@ -71,12 +72,14 @@
|
|||
tableDetails?.REVIEW_STATUS_ID === 'REJECTED'
|
||||
"
|
||||
(click)="approveTableScreen()"
|
||||
[disabled]="revertingChanges"
|
||||
>
|
||||
Approve
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-sm btn-info-outline text-center mr-5i"
|
||||
(click)="goBack()"
|
||||
[disabled]="revertingChanges"
|
||||
>
|
||||
Edit base table
|
||||
</button>
|
||||
|
@ -90,13 +93,15 @@
|
|||
<clr-tooltip>
|
||||
<button
|
||||
*ngIf="tableDetails?.['ALLOW_RESTORE'] === 'YES'"
|
||||
(click)="revertChanges()"
|
||||
clrTooltipTrigger
|
||||
[clrLoading]="revertingChanges"
|
||||
class="btn btn-sm btn-danger text-center mt-20"
|
||||
>
|
||||
REVERT (Coming Soon)
|
||||
|
||||
<clr-tooltip-content
|
||||
clrPosition="bottom-right"
|
||||
clrPosition="bottom-left"
|
||||
clrSize="lg"
|
||||
*clrIfOpen
|
||||
>
|
||||
|
|
|
@ -23,6 +23,7 @@ export class StageComponent implements OnInit {
|
|||
public keysArray: any
|
||||
public tableDetails: any
|
||||
public loaded: boolean = false
|
||||
public revertingChanges: boolean = false
|
||||
public licenceState = this.licenceService.licenceState
|
||||
public hotTable: HotTableInterface = {
|
||||
data: [],
|
||||
|
@ -162,6 +163,24 @@ export class StageComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
revertChanges() {
|
||||
this.revertingChanges = true
|
||||
|
||||
const data = {
|
||||
restore_in: [
|
||||
{
|
||||
load_ref: this.table_id
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
this.sasService.request('editors/restore', data).then(res => {
|
||||
console.log('res', res)
|
||||
}).finally(() => {
|
||||
this.revertingChanges = false
|
||||
})
|
||||
}
|
||||
|
||||
private setFocus() {
|
||||
setTimeout(() => {
|
||||
let approvalBtn: any = window.document.getElementById('approval-btn')
|
||||
|
|
Loading…
Reference in New Issue