mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-16 13:21:57 +00:00
Fix vacancy import (#3756)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
95cc0bb32a
commit
3e8cbb18af
@ -129,24 +129,26 @@
|
|||||||
descriptor: { $in: [view.viewlet.Table, view.viewlet.List] }
|
descriptor: { $in: [view.viewlet.Table, view.viewlet.List] }
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Button
|
{#if viewlet?.descriptor === view.viewlet.Table}
|
||||||
label={recruit.string.Export}
|
<Button
|
||||||
on:click={() => {
|
label={recruit.string.Export}
|
||||||
// Download it
|
on:click={() => {
|
||||||
const filename = 'vacancies' + new Date().toLocaleDateString() + '.csv'
|
// Download it
|
||||||
const link = document.createElement('a')
|
const filename = 'vacancies' + new Date().toLocaleDateString() + '.csv'
|
||||||
link.style.display = 'none'
|
const link = document.createElement('a')
|
||||||
link.setAttribute('target', '_blank')
|
link.style.display = 'none'
|
||||||
link.setAttribute(
|
link.setAttribute('target', '_blank')
|
||||||
'href',
|
link.setAttribute(
|
||||||
'data:text/csv;charset=utf-8,%EF%BB%BF' + encodeURIComponent(tableToCSV('vacanciesData'))
|
'href',
|
||||||
)
|
'data:text/csv;charset=utf-8,%EF%BB%BF' + encodeURIComponent(tableToCSV('vacanciesData'))
|
||||||
link.setAttribute('download', filename)
|
)
|
||||||
document.body.appendChild(link)
|
link.setAttribute('download', filename)
|
||||||
link.click()
|
document.body.appendChild(link)
|
||||||
document.body.removeChild(link)
|
link.click()
|
||||||
}}
|
document.body.removeChild(link)
|
||||||
/>
|
}}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
<Button icon={IconAdd} label={recruit.string.VacancyCreateLabel} kind={'accented'} on:click={showCreateDialog} />
|
<Button icon={IconAdd} label={recruit.string.VacancyCreateLabel} kind={'accented'} on:click={showCreateDialog} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -187,7 +189,8 @@
|
|||||||
...resultQuery,
|
...resultQuery,
|
||||||
archived
|
archived
|
||||||
},
|
},
|
||||||
totalQuery: {}
|
totalQuery: {},
|
||||||
|
tableId: 'vacanciesData'
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{/if}
|
{/if}
|
||||||
|
Loading…
Reference in New Issue
Block a user