Skip to content

Commit

Permalink
Clean up for locked transactions PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
zachwhelchel committed Oct 12, 2023
1 parent 44590f7 commit da7af9d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
8 changes: 5 additions & 3 deletions packages/desktop-client/src/components/accounts/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ class AccountInternal extends PureComponent {
this.setState({ reconcileAmount: balance });
};

onDoneReconciling = async () => {
onDoneReconciling = () => {
this.setState({ reconcileAmount: null });
};

Expand Down Expand Up @@ -794,7 +794,7 @@ class AccountInternal extends PureComponent {
});
};

onBatchEdit = async (name, ids) => {
onBatchEdit = async (name, ids) => {
let onChange = async (name, value) => {
this.setState({ workingHard: true });

Expand All @@ -818,6 +818,8 @@ class AccountInternal extends PureComponent {

transactions.forEach(trans => {
if (name === 'cleared' && trans.reconciled === true) {
// Skip transactions that are reconciled. Don't want to set them as
// uncleared.
return;
}

Expand Down Expand Up @@ -914,7 +916,7 @@ class AccountInternal extends PureComponent {

let { data } = await runQuery(
q('transactions')
.filter({ id: { $oneof: ids }, reconciled: true }) // scope it to account, and others
.filter({ id: { $oneof: ids }, reconciled: true })
.select('*')
.options({ splits: 'grouped' }),
);
Expand Down
16 changes: 0 additions & 16 deletions packages/desktop-client/src/components/schedules/StatusBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,22 +82,6 @@ export function getStatusProps(status: StatusTypes) {
}
}

type Status =
| 'missed'
| 'due'
| 'upcoming'
| 'paid'
| 'completed'
| 'pending'
| 'scheduled'
| 'cleared'
| 'reconciled';

type StatusBadgeProps = {
status: Status;
style?: CSSProperties;
};

export function StatusBadge({ status, style }: StatusBadgeProps) {

Check failure on line 85 in packages/desktop-client/src/components/schedules/StatusBadge.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Cannot find name 'StatusBadgeProps'.
let { color, backgroundColor, Icon } = getStatusProps(status);
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ class TransactionEditInner extends PureComponent {
</View>
{transaction.reconciled ? (
<View style={{ marginLeft: 35, marginRight: 35 }}>
<FieldLabel title="reconciled" />
<FieldLabel title="Reconciled" />
<BooleanField
checked="true"
style={{ marginTop: 4 }}
Expand Down

0 comments on commit da7af9d

Please sign in to comment.