You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
998 B
41 lines
998 B
import { $t, Environment, Downloader } from 'platform-core';
|
|
import { cli } from 'webpack';
|
|
|
|
class TemplateImportAndExportManager {
|
|
#dialogRef: any;
|
|
|
|
constructor(dialogRef: any) {
|
|
this.#dialogRef = dialogRef;
|
|
}
|
|
|
|
public getToolbarAction(): any[] {
|
|
return [
|
|
[
|
|
{
|
|
name: 'templateImportAndExport',
|
|
label: $t('re.templateImportAndExport.action.group'),
|
|
icon: '',
|
|
click: undefined,
|
|
},
|
|
{
|
|
name: 'downloadExcelTemplate',
|
|
label: $t('re.templateImportAndExport.action.downloadTemplate'),
|
|
icon: '',
|
|
click: (args: any) => {
|
|
this.#dialogRef.value.download();
|
|
},
|
|
},
|
|
{
|
|
name: 'uploadExcel',
|
|
label: $t('re.templateImportAndExport.action.upload'),
|
|
icon: '',
|
|
click: (args: any) => {
|
|
this.#dialogRef.value.open();
|
|
},
|
|
},
|
|
],
|
|
];
|
|
}
|
|
}
|
|
|
|
export { TemplateImportAndExportManager };
|
|
|