Skip to content

Commit

Permalink
Merge pull request #1363 from invoiceninja/hot-20231129_fixes_for_cut…
Browse files Browse the repository at this point in the history
…_and_paste

Fixes for cut and paste in clients and vendors
  • Loading branch information
beganovich authored Nov 29, 2023
2 parents e98f221 + 8f17984 commit 8e9847e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@invoiceninja/ui",
"version": "0.0.0",
"version": "29.11.2023.1",
"private": true,
"dependencies": {
"@azure/msal-browser": "^3.0.1",
Expand Down
14 changes: 7 additions & 7 deletions src/pages/clients/edit/components/Details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function Details(props: Props) {
<Element leftSide={t('name')}>
<InputField
id="name"
value={props.client?.name}
value={props.client?.name || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.name}
/>
Expand All @@ -74,7 +74,7 @@ export function Details(props: Props) {
<Element leftSide={t('number')}>
<InputField
id="number"
value={props.client?.number}
value={props.client?.number || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.number}
/>
Expand Down Expand Up @@ -121,7 +121,7 @@ export function Details(props: Props) {
<Element leftSide={t('id_number')}>
<InputField
id="id_number"
value={props.client?.id_number}
value={props.client?.id_number || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.id_number}
/>
Expand All @@ -130,7 +130,7 @@ export function Details(props: Props) {
<Element leftSide={t('vat_number')}>
<InputField
id="vat_number"
value={props.client?.vat_number}
value={props.client?.vat_number || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.vat_number}
/>
Expand All @@ -139,7 +139,7 @@ export function Details(props: Props) {
<Element leftSide={t('website')}>
<InputField
id="website"
value={props.client?.website}
value={props.client?.website || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.website}
/>
Expand All @@ -148,7 +148,7 @@ export function Details(props: Props) {
<Element leftSide={t('phone')}>
<InputField
id="phone"
value={props.client?.phone}
value={props.client?.phone || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.phone}
/>
Expand All @@ -157,7 +157,7 @@ export function Details(props: Props) {
<Element leftSide={t('routing_id')}>
<InputField
id="routing_id"
value={props.client?.routing_id}
value={props.client?.routing_id || ''}
onChange={handleChange}
errorMessage={props.errors?.errors.routing_id}
/>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/clients/edit/components/address/BillingAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function BillingAddress(props: Props) {
<Element leftSide={t('billing_address1')}>
<InputField
id="address1"
value={props.client?.address1}
value={props.client?.address1 || ''}
onChange={handleChange}
errorMessage={errors?.errors.address1}
/>
Expand All @@ -51,7 +51,7 @@ export function BillingAddress(props: Props) {
<Element leftSide={t('address2')}>
<InputField
id="address2"
value={props.client?.address2}
value={props.client?.address2 || ''}
onChange={handleChange}
errorMessage={errors?.errors.address2}
/>
Expand All @@ -60,7 +60,7 @@ export function BillingAddress(props: Props) {
<Element leftSide={t('city')}>
<InputField
id="city"
value={props.client?.city}
value={props.client?.city || ''}
onChange={handleChange}
errorMessage={errors?.errors.city}
/>
Expand All @@ -69,7 +69,7 @@ export function BillingAddress(props: Props) {
<Element leftSide={t('state')}>
<InputField
id="state"
value={props.client?.state}
value={props.client?.state || ''}
onChange={handleChange}
errorMessage={errors?.errors.state}
/>
Expand All @@ -78,7 +78,7 @@ export function BillingAddress(props: Props) {
<Element leftSide={t('postal_code')}>
<InputField
id="postal_code"
value={props.client?.postal_code}
value={props.client?.postal_code || ''}
onChange={handleChange}
errorMessage={errors?.errors.postal_code}
/>
Expand Down
10 changes: 5 additions & 5 deletions src/pages/clients/edit/components/address/ShippingAddress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function ShippingAddress(props: Props) {
<Element leftSide={t('billing_address1')}>
<InputField
id="shipping_address1"
value={props.client?.shipping_address1}
value={props.client?.shipping_address1 || ''}
onChange={handleChange}
errorMessage={errors?.errors.shipping_address1}
/>
Expand All @@ -73,15 +73,15 @@ export function ShippingAddress(props: Props) {
<Element leftSide={t('address2')}>
<InputField
id="shipping_address2"
value={props.client?.shipping_address2}
value={props.client?.shipping_address2 || ''}
onChange={handleChange}
/>
</Element>

<Element leftSide={t('city')}>
<InputField
id="shipping_city"
value={props.client?.shipping_city}
value={props.client?.shipping_city || ''}
onChange={handleChange}
errorMessage={errors?.errors.shipping_city}
/>
Expand All @@ -90,7 +90,7 @@ export function ShippingAddress(props: Props) {
<Element leftSide={t('state')}>
<InputField
id="shipping_state"
value={props.client?.shipping_state}
value={props.client?.shipping_state || ''}
onChange={handleChange}
errorMessage={errors?.errors.shipping_state}
/>
Expand All @@ -99,7 +99,7 @@ export function ShippingAddress(props: Props) {
<Element leftSide={t('postal_code')}>
<InputField
id="shipping_postal_code"
value={props.client?.shipping_postal_code}
value={props.client?.shipping_postal_code || ''}
onChange={handleChange}
errorMessage={errors?.errors.shipping_postal_code}
/>
Expand Down
12 changes: 6 additions & 6 deletions src/pages/vendors/edit/components/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ export function Form(props: Props) {

<Element leftSide={t('name')}>
<InputField
value={vendor.name}
value={vendor.name || ''}
onValueChange={(value) => handleChange('name', value)}
errorMessage={errors?.errors.name}
/>
</Element>

<Element leftSide={t('number')}>
<InputField
value={vendor.number}
value={vendor.number || ''}
onValueChange={(value) => handleChange('number', value)}
errorMessage={errors?.errors.number}
/>
Expand All @@ -133,31 +133,31 @@ export function Form(props: Props) {

<Element leftSide={t('id_number')}>
<InputField
value={vendor.id_number}
value={vendor.id_number || ''}
onValueChange={(value) => handleChange('id_number', value)}
errorMessage={errors?.errors.id_number}
/>
</Element>

<Element leftSide={t('vat_number')}>
<InputField
value={vendor.vat_number}
value={vendor.vat_number || ''}
onValueChange={(value) => handleChange('vat_number', value)}
errorMessage={errors?.errors.vat_number}
/>
</Element>

<Element leftSide={t('website')}>
<InputField
value={vendor.website}
value={vendor.website || ''}
onValueChange={(value) => handleChange('website', value)}
errorMessage={errors?.errors.website}
/>
</Element>

<Element leftSide={t('phone')}>
<InputField
value={vendor.phone}
value={vendor.phone || ''}
onValueChange={(value) => handleChange('phone', value)}
errorMessage={errors?.errors.phone}
/>
Expand Down

0 comments on commit 8e9847e

Please sign in to comment.