Added feature to copy the list of availabilities
This commit is contained in:
parent
ab8bea81c7
commit
84517d06a3
|
|
@ -101,7 +101,18 @@ const AvailabilityViewer = ({ times, people, table }: AvailabilityViewerProps) =
|
||||||
people: peopleHere,
|
people: peopleHere,
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
|
onMouseDown={e => {
|
||||||
|
setTooltip({
|
||||||
|
anchor: e.currentTarget,
|
||||||
|
available: `${peopleHere.length} / ${filteredPeople.length} ${t('available')}`,
|
||||||
|
date: cell.label,
|
||||||
|
people: peopleHere,
|
||||||
|
})
|
||||||
|
let text2Clipboard = t("copy.message") + cell.label + ":\n" + peopleHere.join(';\n') + ";";
|
||||||
|
navigator.clipboard.writeText(text2Clipboard);
|
||||||
|
}}
|
||||||
onMouseLeave={() => setTooltip(undefined)}
|
onMouseLeave={() => setTooltip(undefined)}
|
||||||
|
|
||||||
/>
|
/>
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -130,7 +141,7 @@ const AvailabilityViewer = ({ times, people, table }: AvailabilityViewerProps) =
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<span className={styles.info}>{t('group.info1')}</span>
|
<span className={styles.info}>{t('group.info1')}</span>
|
||||||
|
<span className={styles.info}>{t('group.info3')}</span>
|
||||||
{people.length > 1 && <>
|
{people.length > 1 && <>
|
||||||
<span className={styles.info}>{t('group.info2')}</span>
|
<span className={styles.info}>{t('group.info2')}</span>
|
||||||
<div className={styles.people}>
|
<div className={styles.people}>
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,13 @@
|
||||||
"group": {
|
"group": {
|
||||||
"legend_tooltip": "Click to highlight highest availability",
|
"legend_tooltip": "Click to highlight highest availability",
|
||||||
"info1": "Hover or tap the calendar below to see who is available",
|
"info1": "Hover or tap the calendar below to see who is available",
|
||||||
"info2": "Click the names below to view people individually"
|
"info2": "Click the names below to view people individually",
|
||||||
|
"info3": "Click on a time slot to copy a list of people who are available then"
|
||||||
|
},
|
||||||
|
|
||||||
|
"copy": {
|
||||||
|
"alert": "List of available people copied to clipboard!",
|
||||||
|
"message": "List of available people at "
|
||||||
},
|
},
|
||||||
|
|
||||||
"you": {
|
"you": {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,14 @@
|
||||||
"group": {
|
"group": {
|
||||||
"legend_tooltip": "Click to highlight highest availability",
|
"legend_tooltip": "Click to highlight highest availability",
|
||||||
"info1": "Hover or tap the calendar below to see who is available",
|
"info1": "Hover or tap the calendar below to see who is available",
|
||||||
"info2": "Click the names below to view people individually"
|
"info2": "Click the names below to view people individually",
|
||||||
|
"info3": "Click on a time slot to copy a list of people who are available then"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
"copy": {
|
||||||
|
"alert": "List of available people copied to clipboard!",
|
||||||
|
"message": "List of available people at "
|
||||||
},
|
},
|
||||||
|
|
||||||
"you": {
|
"you": {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,13 @@
|
||||||
"group": {
|
"group": {
|
||||||
"legend_tooltip": "Clique para destacar o melhor tempo",
|
"legend_tooltip": "Clique para destacar o melhor tempo",
|
||||||
"info1": "Passe o mouse ou toque o calendário pra ver quem está livre",
|
"info1": "Passe o mouse ou toque o calendário pra ver quem está livre",
|
||||||
"info2": "Clique nos nomes pra ver a disponibilidade de cada um"
|
"info2": "Clique nos nomes pra ver a disponibilidade de cada um",
|
||||||
|
"info3": "Clica num slot para copiar uma lista das pessoas disponíveis nesse horário"
|
||||||
|
},
|
||||||
|
|
||||||
|
"copy": {
|
||||||
|
"alert": "Lista de pessoas disponíveis copiada!",
|
||||||
|
"message": "Pessoas diponíveis a "
|
||||||
},
|
},
|
||||||
|
|
||||||
"you": {
|
"you": {
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,12 @@
|
||||||
"group": {
|
"group": {
|
||||||
"legend_tooltip": "Clica para realçar as horas com maior disponibilidade",
|
"legend_tooltip": "Clica para realçar as horas com maior disponibilidade",
|
||||||
"info1": "Passa o cursor ou clica no calendário abaixo para ver quem está disponível",
|
"info1": "Passa o cursor ou clica no calendário abaixo para ver quem está disponível",
|
||||||
"info2": "Clica nos nomes abaixo para ver a disponibilidade de cada pessoa"
|
"info2": "Clica nos nomes abaixo para ver a disponibilidade de cada pessoa",
|
||||||
|
"info3": "Clica num slot para copiar uma lista das pessoas disponíveis nesse horário"
|
||||||
|
},
|
||||||
|
"copy": {
|
||||||
|
"alert": "Lista de pessoas disponíveis copiada!",
|
||||||
|
"message": "Pessoas diponíveis a "
|
||||||
},
|
},
|
||||||
|
|
||||||
"you": {
|
"you": {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue