Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{showUpdatedAtOutside && (
<div>
</div>
)}
)
}
}
export default compose(
queryConnect({
triggersCol: {
...triggersConn,
fetchPolicy: CozyClient.fetchPolicies.noFetch
}
}),
connect((state, { account }) => {
const warningLimits = getWarningLimitPerAccount(state)
const accountLimit = warningLimits[account._id]
return {
hasWarning: accountLimit ? accountLimit > account.balance : false
}
}),
withBreakpoints(),
translate(),
React.memo,
withClient
)(AccountRow)
dangerouslySetInnerHTML={{
__html: t('KonnectorUpdateInfo.content')
}}
/>
}
icon="warning"
isImportant
/>
)
}
const outdatedKonnectors = {
query: () =>
Q(KONNECTOR_DOCTYPE).where({ available_version: { $exists: true } }),
fetchPolicy: CozyClient.fetchPolicies.olderThan(30 * 1000),
as: 'outdatedKonnectors'
}
export default compose(
withClient,
queryConnect({
outdatedKonnectors
}),
withBreakpoints(),
React.memo
)(KonnectorUpdateInfo)
attributes: {},
relationships: {}
},
stats: {
doctype: BANK_ACCOUNT_STATS_DOCTYPE,
attributes: {},
relationships: {
account: {
type: 'has-one',
doctype: ACCOUNT_DOCTYPE
}
}
}
}
const older30s = CozyClient.fetchPolicies.olderThan(30 * 1000)
export const accountsConn = {
query: () => Q(ACCOUNT_DOCTYPE).include(['owners']),
as: 'accounts',
fetchPolicy: older30s
}
export const groupsConn = {
query: () => Q(GROUP_DOCTYPE),
as: 'groups',
fetchPolicy: older30s
}
export const triggersConn = {
query: () => Q(TRIGGER_DOCTYPE),
as: 'triggers'
import CozyClient, { Q } from 'cozy-client'
import { TRANSACTION_DOCTYPE } from 'doctypes'
const older30s = CozyClient.fetchPolicies.olderThan(30 * 1000)
export const queryRecurrenceTransactions = recurrence =>
Q(TRANSACTION_DOCTYPE).where({
'relationships.recurrence.data._id': recurrence._id
})
export const queryRecurrencesTransactions = recurrences =>
Q(TRANSACTION_DOCTYPE).where({
'relationships.recurrence.data._id': {
$in: recurrences.map(x => x._id)
}
})
export const bundleTransactionsQueryConn = ({ bundle }) => {
return {
query: () =>
'errored-trigger': TriggerErrorCard
}
TransactionPageErrors.propTypes = {
triggerCol: PropTypes.object.isRequired,
accounts: PropTypes.array.isRequired
}
export default compose(
connect(state => ({
accounts: getFilteredAccounts(state)
})),
queryConnect({
triggerCol: {
...triggersConn,
fetchPolicy: CozyClient.fetchPolicies.noFetch
}
}),
React.memo
)(TransactionPageErrors)