Radu Liviu Carjan
3 years ago
12 changed files with 341 additions and 21366 deletions
-
11app/Http/Controllers/SearchAndDisplaceController.php
-
16app/SearchDisplace/Documents/DocumentFile.php
-
10app/SearchDisplace/Searchers/Searcher.php
-
21205package-lock.json
-
270public/js/app.js
-
11public/js/app.js.LICENSE.txt
-
18resources/js/SearchDisplace/helpers.ts
-
6resources/js/components/Home/Home.ts
-
80resources/js/components/Home/Home.vue
-
70resources/js/components/ProcessFile/ProcessFile.ts
-
4resources/js/components/ProcessFile/ProcessFile.vue
-
6resources/js/interfaces/responses/FileStatusResponse.ts
21205
package-lock.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,11 @@ |
|||
/*! |
|||
* Vue.js v2.6.13 |
|||
* (c) 2014-2021 Evan You |
|||
* Released under the MIT License. |
|||
*/ |
|||
|
|||
/** |
|||
* vue-class-component v7.2.6 |
|||
* (c) 2015-present Evan You |
|||
* @license MIT |
|||
*/ |
@ -0,0 +1,18 @@ |
|||
export function isServerError(e: any) { |
|||
return e && |
|||
typeof (e) === 'object' && |
|||
e.hasOwnProperty('response') && |
|||
e.response && |
|||
e.response.hasOwnProperty('data') && |
|||
e.response.data; |
|||
} |
|||
|
|||
export function getServerErrorMessage(e: any) { |
|||
const error = e.response.data; |
|||
|
|||
if (error.hasOwnProperty('message')) { |
|||
return error.message; |
|||
} |
|||
|
|||
return ''; |
|||
} |
@ -1,36 +1,56 @@ |
|||
<template> |
|||
<div class="wrap" v-if="!fileUploaded && !uploading"> |
|||
<Panel header="Please upload a file"> |
|||
<FileUpload |
|||
name="demo[]" |
|||
:customUpload="true" |
|||
:auto="true" |
|||
@uploader="uploadFile" |
|||
> |
|||
<template #empty> |
|||
<p>Drag and drop files to here to upload.</p> |
|||
<div class="wrap"> |
|||
<template v-if=" ! error"> |
|||
<template v-if=" ! fileUploaded"> |
|||
<template v-if=" ! uploading"> |
|||
<Panel header="Please upload a file"> |
|||
<FileUpload |
|||
name="demo[]" |
|||
:customUpload="true" |
|||
:auto="true" |
|||
@uploader="uploadFile" |
|||
> |
|||
<template #empty> |
|||
<p>Drag and drop files to here to upload.</p> |
|||
</template> |
|||
</FileUpload> |
|||
</Panel> |
|||
|
|||
<BlockUI :blocked="uiBlocked" :fullScreen="true"></BlockUI> |
|||
</template> |
|||
</FileUpload> |
|||
</Panel> |
|||
|
|||
<BlockUI :blocked="uiBlocked" :fullScreen="true"></BlockUI> |
|||
</div> |
|||
<div class="wrap" v-else-if="!fileUploaded && uploading"> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
</div> |
|||
<div class="wrap" v-else> |
|||
<process-file |
|||
@newFile="uploadNewFile" |
|||
:file="uploadResult" |
|||
:searchers="searchers"></process-file> |
|||
<template v-else> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
<Skeleton /><br /> |
|||
</template> |
|||
</template> |
|||
|
|||
<template v-else> |
|||
<process-file :file="uploadResult" |
|||
:searchers="searchers" |
|||
@newFile="uploadNewFile" |
|||
@error="onError"> |
|||
</process-file> |
|||
</template> |
|||
</template> |
|||
|
|||
<template v-else> |
|||
<h1> Something went wrong while processing. </h1> |
|||
|
|||
<p> {{ error }} </p> |
|||
|
|||
<a href="/"> |
|||
<button type="button" class="p-button p-button-primary"> |
|||
Try another file |
|||
</button> |
|||
</a> |
|||
</template> |
|||
</div> |
|||
</template> |
|||
|
|||
<script lang="ts" src="./Home.ts"> |
|||
</script> |
|||
<script lang="ts" src="./Home.ts"></script> |
@ -1,5 +1,5 @@ |
|||
export default interface FileStatusResponse |
|||
{ |
|||
content: string; |
|||
ingest_status: string; |
|||
} |
|||
content?: string; |
|||
status: string; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue