Adding a redacting box to hide the information on the document for invited submitters

pull/109/head^2
iozeey 2 years ago
parent 9100d48cc3
commit 9e754cf6c5

@ -74,3 +74,6 @@ button[disabled] .enabled {
.base-select {
@apply select base-input w-full font-normal;
}
.bg-redact{
background: black;
}

@ -1,5 +1,44 @@
<template>
<div
v-if="field.type === 'redact'"
class="flex absolute"
:style="{ ...computedStyle, backgroundColor: 'black' }"
:class="{ 'cursor-default ': !submittable, 'border ': submittable, 'z-0 ': isActive && submittable, 'bg-opacity-100 ': (isActive || isValueSet) && submittable }"
>
<div
v-if="!isActive && !isValueSet && field.type !== 'checkbox' && submittable"
class="absolute top-0 bottom-0 right-0 left-0 items-center justify-center h-full w-full"
>
<span
v-if="field"
class="flex justify-center items-center h-full opacity-50"
>
<component
:is="fieldIcons[field.type]"
width="100%"
height="100%"
class="max-h-10 text-base-content text-white"
/>
</span>
</div>
<div
v-else
class="flex items-center px-0.5"
>
<span v-if="Array.isArray(modelValue)">
{{ modelValue.join(', ') }}
</span>
<span v-else-if="field.type === 'date'">
{{ formattedDate }}
</span>
<span v-else>
{{ modelValue }}
</span>
</div>
</div>
<div
v-else
class="flex absolute text-[1.5vw] lg:text-base"
:style="computedStyle"
:class="{ 'cursor-default': !submittable, 'bg-red-100 border cursor-pointer ': submittable, 'border-red-100': !isActive && submittable, 'bg-opacity-70': !isActive && !isValueSet && submittable, 'border-red-500 border-dashed z-10': isActive && submittable, 'bg-opacity-30': (isActive || isValueSet) && submittable }"
@ -113,7 +152,7 @@
</template>
<script>
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconCheck, IconColumns3, IconPhoneCheck } from '@tabler/icons-vue'
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconCheck, IconColumns3, IconPhoneCheck, IconBarrierBlock } from '@tabler/icons-vue'
export default {
name: 'FieldArea',
@ -180,7 +219,8 @@ export default {
checkbox: 'Checkbox',
radio: 'Radio',
multiple: 'Multiple Select',
phone: 'Phone'
phone: 'Phone',
redact: 'redact'
}
},
fieldIcons () {
@ -195,7 +235,8 @@ export default {
radio: IconCircleDot,
cells: IconColumns3,
multiple: IconChecks,
phone: IconPhoneCheck
phone: IconPhoneCheck,
redact: IconBarrierBlock
}
},
image () {

@ -275,6 +275,15 @@
@focus="$refs.areas.scrollIntoField(currentField)"
@submit="submitStep"
/>
<RedactStep
v-else-if="currentField.type === 'redact'"
ref="currentStep"
v-model="values[currentField.uuid]"
:field="currentField"
:submitter-slug="submitterSlug"
@focus="$refs.areas.scrollIntoField(currentField)"
@submit="submitStep"
/>
</div>
<div class="mt-6 md:mt-8">
<button
@ -331,6 +340,7 @@ import SignatureStep from './signature_step'
import AttachmentStep from './attachment_step'
import MultiSelectStep from './multi_select_step'
import PhoneStep from './phone_step'
import RedactStep from './redact_step.vue'
import FormCompleted from './completed'
import { IconInnerShadowTop, IconArrowsDiagonal, IconArrowsDiagonalMinimize2 } from '@tabler/icons-vue'
import { t } from './i18n'
@ -346,6 +356,7 @@ export default {
IconInnerShadowTop,
IconArrowsDiagonal,
PhoneStep,
RedactStep,
IconArrowsDiagonalMinimize2,
FormCompleted
},

@ -15,6 +15,7 @@ const en = {
signed_with: 'Signed with',
open_source_documents_software: 'open source documents software',
verified_phone_number: 'Verify Phone Number',
redact: 'redact',
use_international_format: 'Use internatioanl format: +1xxx',
six_digits_code: '6-digit code',
change_phone_number: 'Change phone number',
@ -41,6 +42,7 @@ const es = {
signed_with: 'Firmado con',
open_source_documents_software: 'software de documentos de código abierto',
verified_phone_number: 'Verificar número de teléfono',
redact: 'redact',
use_international_format: 'Usar formato internacional: +1xxx',
six_digits_code: 'Código de 6 dígitos',
change_phone_number: 'Cambiar número de teléfono',
@ -67,6 +69,7 @@ const it = {
signed_with: 'Firmato con',
open_source_documents_software: 'software di documenti open source',
verified_phone_number: 'Verifica numero di telefono',
redact: 'redact',
use_international_format: 'Usa formato internazionale: +1xxx',
six_digits_code: 'Codice a 6 cifre',
change_phone_number: 'Cambia numero di telefono',
@ -93,6 +96,7 @@ const de = {
signed_with: 'Unterschrieben mit',
open_source_documents_software: 'Open-Source-Dokumentensoftware',
verified_phone_number: 'Telefonnummer überprüfen',
redact: 'redact',
use_international_format: 'Internationales Format verwenden: +1xxx',
six_digits_code: '6-stelliger Code',
change_phone_number: 'Telefonnummer ändern',
@ -119,6 +123,7 @@ const fr = {
signed_with: 'Signé avec',
open_source_documents_software: 'logiciel de documents open source',
verified_phone_number: 'Vérifier le numéro de téléphone',
redact: 'redact',
use_international_format: 'Utiliser le format international : +1xxx',
six_digits_code: 'Code à 6 chiffres',
change_phone_number: 'Changer le numéro de téléphone',
@ -145,6 +150,7 @@ const pl = {
signed_with: 'Podpisane za pomocą',
open_source_documents_software: 'oprogramowanie do dokumentów open source',
verified_phone_number: 'Zweryfikuj numer telefonu',
redact: 'redact',
use_international_format: 'Użyj międzynarodowego formatu: +1xxx',
six_digits_code: '6-cyfrowy kod',
change_phone_number: 'Zmień numer telefonu',
@ -171,6 +177,7 @@ const uk = {
signed_with: 'Підписано за допомогою',
open_source_documents_software: 'відкритий програмний засіб для документів',
verified_phone_number: 'Підтвердіть номер телефону',
redact: 'redact',
use_international_format: 'Використовуйте міжнародний формат: +1xxx',
six_digits_code: '6-значний код',
change_phone_number: 'Змінити номер телефону',
@ -197,6 +204,7 @@ const cs = {
signed_with: 'Podepsáno pomocí',
open_source_documents_software: 'open source software pro dokumenty',
verified_phone_number: 'Ověřte telefonní číslo',
redact: 'redact',
use_international_format: 'Použijte mezinárodní formát: +1xxx',
six_digits_code: '6-místný kód',
change_phone_number: 'Změnit telefonní číslo',
@ -223,6 +231,7 @@ const pt = {
signed_with: 'Assinado com',
open_source_documents_software: 'software de documentos de código aberto',
verified_phone_number: 'Verificar Número de Telefone',
redact: 'redact',
use_international_format: 'Use formato internacional: +1xxx',
six_digits_code: 'Código de 6 dígitos',
change_phone_number: 'Alterar número de telefone',

@ -0,0 +1,5 @@
<template>
<div>
<p class="text-center">This portion is redacted</p>
</div>
</template>

@ -92,6 +92,23 @@
</button>
</div>
<div
v-if="field.type === 'redact'"
class="opacity-100 flex items-center justify-center h-full w-full bg-redact"
>
<span
v-if="field"
class="flex justify-center items-center space-x-1 h-full"
>
<component
:is="fieldIcons[field.type]"
width="100%"
height="100%"
class="max-h-10 text-white"
/>
</span>
</div>
<div
v-else
class="opacity-50 flex items-center justify-center h-full w-full"
:class="bgColors[submitterIndex]"
>

@ -43,8 +43,7 @@
</template>
<script>
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconColumns3, IconPhoneCheck } from '@tabler/icons-vue'
import { IconTextSize, IconWritingSign, IconCalendarEvent, IconPhoto, IconCheckbox, IconPaperclip, IconSelect, IconCircleDot, IconChecks, IconColumns3, IconPhoneCheck, IconBarrierBlock } from '@tabler/icons-vue'
export default {
name: 'FiledTypeDropdown',
inject: ['withPhone'],
@ -83,7 +82,8 @@ export default {
multiple: 'Multiple',
radio: 'Radio',
cells: 'Cells',
phone: 'Phone'
phone: 'Phone',
redact: 'redact'
}
},
fieldIcons () {
@ -98,7 +98,8 @@ export default {
cells: IconColumns3,
multiple: IconChecks,
radio: IconCircleDot,
phone: IconPhoneCheck
phone: IconPhoneCheck,
redact: IconBarrierBlock
}
}
},

@ -11,6 +11,7 @@ module.exports = {
secondary: '#ef9fbc',
accent: '#eeaf3a',
neutral: '#291334',
black: '#000000',
'base-100': '#faf7f5',
'base-200': '#efeae6',
'base-300': '#e7e2df',

Loading…
Cancel
Save