Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
feat(resource): upload pdf document (DSP-1776) (#481)
* feat(resource): display supported file types in upload form * feat(resource): upload document (pdf) * chore(deps): bump dsp-js to v2.6.0 * fix(test): bug fix in tests * refactor(resource): set correct switch cases * fix(resource): fix stupid bug * refactor(lint): make ts-lint happy
- Loading branch information
1 parent
f472ca4
commit d916b4b
Showing
10 changed files
with
140 additions
and
49 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,8 @@ | ||
import { SplitPipe } from './split.pipe'; | ||
|
||
describe('SplitPipe', () => { | ||
it('create an instance', () => { | ||
const pipe = new SplitPipe(); | ||
expect(pipe).toBeTruthy(); | ||
}); | ||
}); |
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,22 @@ | ||
import { Pipe, PipeTransform } from '@angular/core'; | ||
|
||
/** | ||
* splits by first argument and returns element from position (second argument) | ||
* | ||
* mystr = application/pdf | ||
* {{ mystr | split: '/':1 }} --> returns 'pdf' | ||
*/ | ||
@Pipe({ | ||
name: 'split' | ||
}) | ||
export class SplitPipe implements PipeTransform { | ||
|
||
transform(val: string, separator: string, position: number): string { | ||
return val.split(separator)[position]; | ||
} | ||
|
||
// transform(value: unknown, ...args: unknown[]): unknown { | ||
// return null; | ||
// } | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
font-size: 48px; | ||
padding: 0; | ||
position: inherit; | ||
top: 35%; | ||
top: 12%; | ||
} | ||
.title { | ||
bottom: 20%; | ||
|
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
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