diff --git a/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkForm.tsx b/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkForm.tsx
index 18127dcb9..42b879d1f 100644
--- a/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkForm.tsx
+++ b/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkForm.tsx
@@ -1,11 +1,11 @@
import React from 'react';
import { Intent } from '@blueprintjs/core';
import { Formik, Form, FormikHelpers } from 'formik';
+import moment from 'moment';
import { useCreatePaymentLink } from '@/hooks/query/payment-link';
import { AppToaster } from '@/components';
import { SharePaymentLinkFormSchema } from './SharePaymentLinkForm.schema';
import { useDialogContext } from '@/components/Dialog/DialogProvider';
-import { useDialogActions } from '@/hooks/state';
import { useSharePaymentLink } from './SharePaymentLinkProvider';
interface SharePaymentLinkFormProps {
@@ -20,8 +20,8 @@ interface SharePaymentLinkFormValues {
}
const initialValues = {
- publicity: '',
- expiryDate: '',
+ publicity: 'public',
+ expiryDate: moment().add(30, 'days').format('YYYY-MM-DD'),
transactionId: '',
transactionType: '',
};
diff --git a/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkFormContent.tsx b/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkFormContent.tsx
index 0c93ba9c1..e93960228 100644
--- a/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkFormContent.tsx
+++ b/packages/webapp/src/containers/PaymentLink/dialogs/SharePaymentLinkDialog/SharePaymentLinkFormContent.tsx
@@ -1,13 +1,17 @@
// @ts-nocheck
import {
Button,
+ Classes,
+ DialogBody,
+ DialogFooter,
FormGroup,
InputGroup,
Intent,
Position,
+ Tooltip,
} from '@blueprintjs/core';
import {
- DialogFooter,
+ DialogFooterActions,
FDateInput,
FFormGroup,
FSelect,
@@ -28,58 +32,100 @@ export function SharePaymentLinkFormContent() {
return (
<>
-
-
-
- date.toLocaleDateString()}
- parseDate={(str) => new Date(str)}
- inputProps={{
- fill: true,
- leftElement: ,
- }}
- fastField
- />
-
-
- {url && (
-
-
- Copy
-
- }
+
+
+
+ (
+ }
+ minimal
+ />
+ )}
+ searchable={false}
+ fastField
/>
-
- )}
-
+
+
+
+ Select an expiration date and generate the link to share it with
+ your customer. Remember that anyone who has access to this link can
+ view, print or download it.
+
+
+
+ date.toLocaleDateString()}
+ parseDate={(str) => new Date(str)}
+ inputProps={{
+ fill: true,
+ style: { minWidth: 260 },
+ leftElement: ,
+ }}
+ fastField
+ />
+
+
+ {url && (
+
+
+ }
+ />
+
+ }
+ />
+
+ )}
+
+
- {url ? (
-
- Copy Link
-
- ) : (
- <>
-
- Generate
+
+ {url ? (
+
+ Copy Link
- Cancel
- >
- )}
+ ) : (
+ <>
+ Cancel
+
+ Generate
+
+ >
+ )}
+
>
);
diff --git a/packages/webapp/src/static/json/icons.tsx b/packages/webapp/src/static/json/icons.tsx
index ca889ecd8..a870a0c6d 100644
--- a/packages/webapp/src/static/json/icons.tsx
+++ b/packages/webapp/src/static/json/icons.tsx
@@ -644,8 +644,14 @@ export default {
},
share: {
path: [
- 'M10.99 13.99h-9v-9h4.76l2-2H.99c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h11c.55 0 1-.45 1-1V7.24l-2 2v4.75zm4-14h-5c-.55 0-1 .45-1 1s.45 1 1 1h2.59L7.29 7.28a1 1 0 00-.3.71 1.003 1.003 0 001.71.71l5.29-5.29V6c0 .55.45 1 1 1s1-.45 1-1V1c0-.56-.45-1.01-1-1.01z'
+ 'M10.99 13.99h-9v-9h4.76l2-2H.99c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h11c.55 0 1-.45 1-1V7.24l-2 2v4.75zm4-14h-5c-.55 0-1 .45-1 1s.45 1 1 1h2.59L7.29 7.28a1 1 0 00-.3.71 1.003 1.003 0 001.71.71l5.29-5.29V6c0 .55.45 1 1 1s1-.45 1-1V1c0-.56-.45-1.01-1-1.01z',
],
viewBox: '0 0 16 16',
- }
+ },
+ clipboard: {
+ path: [
+ 'M11,2c0-0.55-0.45-1-1-1h0.22C9.88,0.4,9.24,0,8.5,0S7.12,0.4,6.78,1H7C6.45,1,6,1.45,6,2v1h5V2z M13,2h-1v2H5V2H4C3.45,2,3,2.45,3,3v12c0,0.55,0.45,1,1,1h9c0.55,0,1-0.45,1-1V3C14,2.45,13.55,2,13,2z',
+ ],
+ viewBox: '0 0 16 16',
+ },
};