-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add admin tool to import pdf files as plain text
- Loading branch information
1 parent
b839855
commit a97869f
Showing
9 changed files
with
220 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,55 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { PageAdminEventComponent } from './pages'; | ||
import { AdminMainViewComponent, AdminHeatToolComponent, AdminImportToolComponent, AdminEventListComponent } from './components'; | ||
import {NgModule} from '@angular/core'; | ||
import {CommonModule} from '@angular/common'; | ||
import {PageAdminEventComponent} from './pages'; | ||
import { | ||
AdminMainViewComponent, | ||
AdminHeatToolComponent, | ||
AdminImportToolComponent, | ||
AdminEventListComponent, | ||
AdminImportTextDialog | ||
} from './components'; | ||
import {ElementsModule} from "../../shared/elements/elements.module"; | ||
import {EventsModule} from "../events"; | ||
import {CoreModule} from "../../core/core.module"; | ||
import {StartsModule} from "../starts"; | ||
import {ReactiveFormsModule} from "@angular/forms"; | ||
import {FormsModule, ReactiveFormsModule} from "@angular/forms"; | ||
import {MatIconModule} from "@angular/material/icon"; | ||
import {LiveModule} from "../live"; | ||
import {MatRadioModule} from "@angular/material/radio"; | ||
|
||
import {MatDialogActions, MatDialogClose, MatDialogContent, MatDialogTitle} from "@angular/material/dialog"; | ||
import {MatFormFieldModule} from "@angular/material/form-field"; | ||
import {MatButtonModule} from "@angular/material/button"; | ||
import {MatInputModule} from "@angular/material/input"; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
PageAdminEventComponent, | ||
AdminMainViewComponent, | ||
AdminHeatToolComponent, | ||
AdminImportToolComponent, | ||
AdminEventListComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
ElementsModule, | ||
EventsModule, | ||
CoreModule, | ||
StartsModule, | ||
ReactiveFormsModule, | ||
MatIconModule, | ||
LiveModule, | ||
MatRadioModule | ||
] | ||
declarations: [ | ||
PageAdminEventComponent, | ||
AdminMainViewComponent, | ||
AdminHeatToolComponent, | ||
AdminImportToolComponent, | ||
AdminEventListComponent, | ||
AdminImportTextDialog | ||
], | ||
imports: [ | ||
CommonModule, | ||
ElementsModule, | ||
EventsModule, | ||
CoreModule, | ||
StartsModule, | ||
ReactiveFormsModule, | ||
MatIconModule, | ||
LiveModule, | ||
MatRadioModule, | ||
MatDialogTitle, | ||
MatDialogContent, | ||
FormsModule, | ||
MatFormFieldModule, | ||
MatDialogActions, | ||
MatButtonModule, | ||
MatInputModule, | ||
MatDialogClose | ||
] | ||
}) | ||
export class AdminModule { } | ||
export class AdminModule { | ||
} |
12 changes: 12 additions & 0 deletions
12
src/app/content/admin/components/admin-import-tool/admin-import-text-dialog.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<h2 mat-dialog-title>Import PDF from Text</h2> | ||
<mat-dialog-content> | ||
<mat-form-field class="text-area-field"> | ||
<mat-label>Text from PDF</mat-label> | ||
<textarea matInput [(ngModel)]="data.text"> | ||
</textarea> | ||
</mat-form-field> | ||
</mat-dialog-content> | ||
<mat-dialog-actions> | ||
<button mat-button (click)="onNoClick()">Cancel</button> | ||
<button mat-button [mat-dialog-close]="data" cdkFocusInitial>Import</button> | ||
</mat-dialog-actions> |
3 changes: 3 additions & 0 deletions
3
src/app/content/admin/components/admin-import-tool/admin-import-text-dialog.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.text-area-field { | ||
width: 100%; | ||
} |
20 changes: 20 additions & 0 deletions
20
src/app/content/admin/components/admin-import-tool/admin-import-text-dialog.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {Component, Inject} from "@angular/core"; | ||
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog"; | ||
import {ImportFileRequest} from "../../../../core/service/api/import/import-file.service"; | ||
|
||
@Component({ | ||
selector: 'sr-admin-import-text-dialog', | ||
templateUrl: './admin-import-text-dialog.component.html', | ||
styleUrls: ['./admin-import-text-dialog.component.scss'] | ||
}) | ||
export class AdminImportTextDialog { | ||
Check failure on line 10 in src/app/content/admin/components/admin-import-tool/admin-import-text-dialog.component.ts
|
||
constructor( | ||
public dialogRef: MatDialogRef<AdminImportTextDialog>, | ||
@Inject(MAT_DIALOG_DATA) public data: ImportFileRequest, | ||
) { | ||
} | ||
|
||
onNoClick(): void { | ||
this.dialogRef.close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
104 changes: 55 additions & 49 deletions
104
src/app/content/admin/components/admin-import-tool/admin-import-tool.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,89 +1,95 @@ | ||
@import "../../../../../colors"; | ||
|
||
.refresh-btn { | ||
float: right; | ||
margin-top: -50px; | ||
float: right; | ||
margin-top: -50px; | ||
} | ||
|
||
sr-panel { | ||
height: 150px; | ||
vertical-align: top; | ||
margin-bottom: 56px; | ||
//height: 150px; | ||
vertical-align: top; | ||
margin-bottom: 16px; | ||
} | ||
|
||
sr-panel:first-of-type { | ||
margin-right: 12px; | ||
margin-right: 12px; | ||
} | ||
|
||
mat-radio-group { | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 0 8px; | ||
padding-right: 21px; | ||
display: inline-block; | ||
vertical-align: top; | ||
margin: 0 8px; | ||
padding-right: 21px; | ||
} | ||
|
||
mat-radio-button { | ||
display: block; | ||
display: block; | ||
} | ||
|
||
.file-import { | ||
display: block; | ||
display: block; | ||
} | ||
|
||
.file-import, | ||
.file-import-url { | ||
width: 400px; | ||
margin: 4px 0; | ||
width: 400px; | ||
margin: 4px 0; | ||
} | ||
|
||
.file-list { | ||
display: inline-block; | ||
height: 138px; | ||
overflow-y: auto; | ||
overflow-x: hidden; | ||
width: 350px; | ||
display: inline-block; | ||
height: 138px; | ||
overflow-y: auto; | ||
overflow-x: hidden; | ||
width: 350px; | ||
} | ||
|
||
.file-list, | ||
.file-list-buttons { | ||
display: inline-block; | ||
vertical-align: top; | ||
display: inline-block; | ||
vertical-align: top; | ||
} | ||
|
||
.file-list-buttons { | ||
margin-left: 12px; | ||
sr-btn { | ||
display: block; | ||
margin: 4px 0; | ||
} | ||
margin-left: 12px; | ||
|
||
sr-btn { | ||
display: block; | ||
margin: 4px 0; | ||
} | ||
} | ||
|
||
.file-name { | ||
display: block; | ||
text-overflow: ellipsis; | ||
width: 328px; | ||
padding: 2px; | ||
margin: 0; | ||
background-color: transparent; | ||
cursor: pointer; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
|
||
&.file-selected { | ||
background-color: $color-bg-contrast; | ||
} | ||
|
||
&.file-not-public { | ||
color: $color-text-gray; | ||
} | ||
display: block; | ||
text-overflow: ellipsis; | ||
width: 328px; | ||
padding: 2px; | ||
margin: 0; | ||
background-color: transparent; | ||
cursor: pointer; | ||
overflow: hidden; | ||
white-space: nowrap; | ||
|
||
&.file-selected { | ||
background-color: $color-bg-contrast; | ||
} | ||
|
||
&.file-not-public { | ||
color: $color-text-gray; | ||
} | ||
} | ||
|
||
.import-button-box { | ||
display: inline-block; | ||
display: inline-block; | ||
|
||
.file-import-events { | ||
width: 100px; | ||
display: block; | ||
margin: 4px 0; | ||
} | ||
.pdf-to-text-btn { | ||
margin-top: 4px; | ||
display: block; | ||
} | ||
|
||
.file-import-events { | ||
width: 100px; | ||
display: block; | ||
margin: 4px 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.