mirror of
https://github.com/sartography/cr-connect-bpmn.git
synced 2025-02-18 03:17:09 +00:00
Merge pull request #99 from sartography/dmn-from-spreadsheet-395
Dmn from spreadsheet #395
This commit is contained in:
commit
e5439a5680
@ -63,7 +63,7 @@
|
|||||||
"ngx-markdown": "^12.0.1",
|
"ngx-markdown": "^12.0.1",
|
||||||
"protractor": "^7.0.0",
|
"protractor": "^7.0.0",
|
||||||
"rxjs": "^6.5.3",
|
"rxjs": "^6.5.3",
|
||||||
"sartography-workflow-lib": "^0.0.556",
|
"sartography-workflow-lib": "^0.0.558",
|
||||||
"tslib": "^2.3.0",
|
"tslib": "^2.3.0",
|
||||||
"uuid": "^8.3.2",
|
"uuid": "^8.3.2",
|
||||||
"zone.js": "^0.11.4"
|
"zone.js": "^0.11.4"
|
||||||
|
@ -86,4 +86,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input hidden (change)="onFileSelected($event)" #fileInput type="file" id="file" accept=".bpmn,.dmn,.xml,application/xml,text/xml">
|
<input hidden (change)="onFileSelected($event)" #fileInput type="file" id="file" accept=".bpmn,.dmn,.xml,.xlsx,application/xml,text/xml">
|
||||||
|
@ -133,8 +133,24 @@ export class ModelerComponent implements AfterViewInit {
|
|||||||
onSubmitFileToOpen() {
|
onSubmitFileToOpen() {
|
||||||
this.expandToolbar = false;
|
this.expandToolbar = false;
|
||||||
|
|
||||||
|
/** If it is a spreadsheet, create a DMN from it */
|
||||||
|
if (this.diagramFile && this.diagramFile.type.toLowerCase() === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
|
||||||
|
this.api.createDMNFromSS(this.diagramFile).subscribe(file => {
|
||||||
|
let fileMeta = {
|
||||||
|
id: 0,
|
||||||
|
content_type: 'text/xml',
|
||||||
|
name: 'new_dmn',
|
||||||
|
type: FileType.DMN,
|
||||||
|
}
|
||||||
|
this.diagramFile = newFileFromResponse(fileMeta, file);
|
||||||
|
console.log(this.diagramFile);
|
||||||
|
console.log(file);
|
||||||
|
this.readFile(this.diagramFile);
|
||||||
|
});
|
||||||
|
|
||||||
if (this.diagramFile && ModelerComponent.isXmlFile(this.diagramFile)) {
|
}
|
||||||
|
|
||||||
|
else if (this.diagramFile && ModelerComponent.isXmlFile(this.diagramFile)) {
|
||||||
this.readFile(this.diagramFile);
|
this.readFile(this.diagramFile);
|
||||||
} else {
|
} else {
|
||||||
this.handleImported({
|
this.handleImported({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user