Skip to content

Commit c3c34f3

Browse files
fix(condo): DOMA-11266 fix updateTourStep payload (#5924)
* fix(condo): DOMA-11266 fix updateTourStep payload * fix(condo): DOMA-11266 fix button tracking * fix(condo): DOMA-11264 update ticket ignore fields * fix(condo): DOMA-11265 fix meter address search
1 parent 854e7d7 commit c3c34f3

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

apps/condo/domains/common/components/Button.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ export const Button: React.FC<CustomButtonProps> = (props) => {
303303
value,
304304
location: window.location.href,
305305
})
306-
onClick(e)
306+
307+
if (onClick) {
308+
onClick(e)
309+
}
307310
}, [id, onClick, type, value])
308311

309312
if (!SKIP_BUTTON_TYPES_FOR_DEFAULT.includes(type)) {

apps/condo/domains/common/utils/userid.utils.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ import cookie from 'js-cookie'
22

33
import { makeId } from './makeid.utils'
44

5+
/** @deprecated use one from @open-condo/miniapp-utils */
56
function getCurrentUserId () {
6-
let current = cookie.get('userId')
7+
let current = cookie.get('fingerprint')
78
if (!current) {
89
current = makeId(12)
910
}
10-
cookie.set('userId', current, { expires: 365 })
11+
cookie.set('fingerprint', current, { expires: 365 })
1112
return current
1213
}
1314

15+
/** @deprecated use one from @open-condo/miniapp-utils */
1416
function getClientSideSenderInfo () {
1517
return {
1618
dv: 1,

apps/condo/domains/onboarding/contexts/TourContext.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ export const TourProvider: React.FC = ({ children }) => {
120120
variables: {
121121
id: tourStep.id,
122122
data: {
123+
dv: 1,
124+
sender: getClientSideSenderInfo(),
123125
status: TourStepStatusType.Completed,
124126
},
125127
},

apps/condo/domains/property/components/PropertyAddressSearchInput.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const PropertyAddressSearchInput: React.FC<IAddressSearchInput> = (props)
117117
infinityScroll
118118
notFoundContent={notFoundContent}
119119
/>
120-
), [organizationId, disabled, notFoundContent])
120+
), [props, searchAddress, renderOption, initialValueGetter, notFoundContent])
121121

122122
return <MemoizedBaseSearchInput/>
123123
}

apps/condo/domains/ticket/utils/clientSchema/Ticket.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { Ticket as TicketGQL } from '@condo/domains/ticket/gql'
1818

1919
const RELATIONS = ['status', 'client', 'contact', 'operator', 'assignee', 'organization', 'source', 'property', 'executor', 'related', 'classifier']
2020
const DISCONNECT_ON_NULL = ['assignee', 'executor', 'contact']
21-
const IGNORE_FIELDS = ['invoices', 'createdByType', 'initialNotDraftInvoices', 'invoicesInNotCanceledStatus']
21+
const IGNORE_FIELDS = ['invoices', 'existedInvoices', 'createdByType', 'initialNotDraftInvoices', 'invoicesInNotCanceledStatus']
2222

2323
export interface ITicketFormState {
2424
id?: undefined

apps/condo/domains/ticket/utils/clientSchema/search.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { isEmpty } = require('lodash')
55

66
const GET_PROPERTY_BY_ID_QUERY = gql`
77
query GetPropertyByIdQuery ($propertyId: ID!, $organizationId: ID) {
8-
objs: allProperties(where: {id: $propertyId, organization: { id: $organizationId }}) {
8+
objs: allProperties(where: {id: $propertyId, organization: { id: $organizationId }}, first: 1) {
99
id
1010
address
1111
}
@@ -14,7 +14,7 @@ const GET_PROPERTY_BY_ID_QUERY = gql`
1414

1515
const GET_ALL_SOURCES_QUERY = gql`
1616
query selectSource ($value: String, $organizationId: ID) {
17-
objs: allTicketSources(where: {name_contains: $value, organization: { id: $organizationId }}) {
17+
objs: allTicketSources(where: {name_contains: $value, organization: { id: $organizationId }}, first: 100) {
1818
id
1919
name
2020
}

0 commit comments

Comments
 (0)