mirror of
https://github.com/valitydev/control-center.git
synced 2024-11-06 02:25:17 +00:00
IMP-251: Remove payouts (#377)
This commit is contained in:
parent
55d2817cd8
commit
3ddefcdfca
8
package-lock.json
generated
8
package-lock.json
generated
@ -21,7 +21,7 @@
|
||||
"@angular/router": "18.0.5",
|
||||
"@ngneat/input-mask": "6.0.0",
|
||||
"@vality/deanonimus-proto": "2.0.1-2a02d87.0",
|
||||
"@vality/domain-proto": "2.0.1-e5d3c83.0",
|
||||
"@vality/domain-proto": "2.0.1-6051aa9.0",
|
||||
"@vality/dominator-proto": "1.0.1-41bee97.0",
|
||||
"@vality/fistful-proto": "2.0.1-88e69a5.0",
|
||||
"@vality/machinegun-proto": "1.0.0",
|
||||
@ -6571,9 +6571,9 @@
|
||||
"integrity": "sha512-mokuK6w+ExASdDE6+L9bM2SaS0yVPSyBvXavY8rRtNzZgVdmj7KSRiyGmXz41grhS6jcvD8aR85Nj4o7/iogmQ=="
|
||||
},
|
||||
"node_modules/@vality/domain-proto": {
|
||||
"version": "2.0.1-e5d3c83.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/domain-proto/-/domain-proto-2.0.1-e5d3c83.0.tgz",
|
||||
"integrity": "sha512-G6FpLCyx7kZZIox90PFUe0FsiAzUTtHZ42gqK7pTyHn2mOzampUuQyyn9MwPkQv6atGLXXiSzEY+qmZIWWkvHQ=="
|
||||
"version": "2.0.1-6051aa9.0",
|
||||
"resolved": "https://registry.npmjs.org/@vality/domain-proto/-/domain-proto-2.0.1-6051aa9.0.tgz",
|
||||
"integrity": "sha512-QbiCNs316WvQHG/LTpkIhT3FTT6Mv/9vm1dKsEk0vPAQSPCvFZKZ6FKk/wEG9KCKzI1ESIJ1ClKo4n9dt8w3ew=="
|
||||
},
|
||||
"node_modules/@vality/dominator-proto": {
|
||||
"version": "1.0.1-41bee97.0",
|
||||
|
@ -29,7 +29,7 @@
|
||||
"@angular/router": "18.0.5",
|
||||
"@ngneat/input-mask": "6.0.0",
|
||||
"@vality/deanonimus-proto": "2.0.1-2a02d87.0",
|
||||
"@vality/domain-proto": "2.0.1-e5d3c83.0",
|
||||
"@vality/domain-proto": "2.0.1-6051aa9.0",
|
||||
"@vality/dominator-proto": "1.0.1-41bee97.0",
|
||||
"@vality/fistful-proto": "2.0.1-88e69a5.0",
|
||||
"@vality/machinegun-proto": "1.0.0",
|
||||
|
@ -153,7 +153,6 @@ export class CreateShopDialogComponent
|
||||
this.form.value;
|
||||
const contractorId = short().uuid();
|
||||
const contractId = short().uuid();
|
||||
const payoutToolId = short().generate();
|
||||
const shopId = short().uuid();
|
||||
this.claimManagementService
|
||||
.UpdateClaim(
|
||||
@ -185,27 +184,6 @@ export class CreateShopDialogComponent
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
party_modification: {
|
||||
contract_modification: {
|
||||
id: contractId,
|
||||
modification: {
|
||||
payout_tool_modification: {
|
||||
payout_tool_id: payoutToolId,
|
||||
modification: {
|
||||
creation: {
|
||||
currency: currency,
|
||||
tool_info: {
|
||||
russian_bank_account:
|
||||
DEFAULT_RUSSIAN_BANK_ACCOUNT,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
party_modification: {
|
||||
shop_modification: {
|
||||
@ -216,7 +194,6 @@ export class CreateShopDialogComponent
|
||||
category: category,
|
||||
location: DEFAULT_SHOP_LOCATION,
|
||||
contract_id: contractId,
|
||||
payout_tool_id: payoutToolId,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -47,12 +47,6 @@ export const MODIFICATIONS_NAME_TREE: ModificationsNameTree<Modification> = {
|
||||
creation: 'Contract Adjustment Creation',
|
||||
},
|
||||
},
|
||||
payout_tool_modification: {
|
||||
modification: {
|
||||
creation: 'Contract Payout Tool Creation',
|
||||
info_modification: 'Contract Payout Tool Info',
|
||||
},
|
||||
},
|
||||
legal_agreement_binding: 'Contract Legal Agreement Binding',
|
||||
report_preferences_modification: 'Contract Report Preferences',
|
||||
contractor_modification: 'Contract Contractor',
|
||||
@ -64,10 +58,8 @@ export const MODIFICATIONS_NAME_TREE: ModificationsNameTree<Modification> = {
|
||||
category_modification: 'Shop Category',
|
||||
details_modification: 'Shop Details',
|
||||
contract_modification: 'Shop Contract',
|
||||
payout_tool_modification: 'Shop Payout Tool',
|
||||
location_modification: 'Shop Location',
|
||||
shop_account_creation: 'Shop Account Creation',
|
||||
payout_schedule_modification: 'Shop Schedule',
|
||||
cash_register_modification_unit: {
|
||||
modification: {
|
||||
creation: 'Shop Cash Register Creation',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Claim, PayoutToolModificationUnit } from '@vality/domain-proto/claim_management';
|
||||
import { Claim } from '@vality/domain-proto/claim_management';
|
||||
import { Party } from '@vality/domain-proto/domain';
|
||||
import { isTypeWithAliases } from '@vality/ng-thrift';
|
||||
import uniqBy from 'lodash-es/uniqBy';
|
||||
@ -34,20 +34,6 @@ function createClaimOptions(
|
||||
);
|
||||
}
|
||||
|
||||
function createClaimPayoutToolOptions(
|
||||
modificationUnits: PayoutToolModificationUnit[],
|
||||
): MetadataFormExtensionOption[] {
|
||||
return uniqBy(
|
||||
modificationUnits.map((unit) => ({
|
||||
label: 'From claim',
|
||||
details: unit.modification,
|
||||
value: unit.payout_tool_id,
|
||||
color: 'primary',
|
||||
})),
|
||||
'value',
|
||||
);
|
||||
}
|
||||
|
||||
function mergeClaimAndPartyOptions(
|
||||
claimOptions: MetadataFormExtensionOption[],
|
||||
partyOptions: MetadataFormExtensionOption[],
|
||||
@ -139,22 +125,5 @@ export function createPartyClaimDomainMetadataFormExtensions(
|
||||
isIdentifier: true,
|
||||
}),
|
||||
},
|
||||
{
|
||||
determinant: (data) => of(isTypeWithAliases(data, 'PayoutToolID', 'domain')),
|
||||
extension: () =>
|
||||
of({
|
||||
options: createClaimPayoutToolOptions(
|
||||
claim.changeset
|
||||
.map(
|
||||
(unit) =>
|
||||
unit.modification.party_modification?.contract_modification
|
||||
?.modification?.payout_tool_modification,
|
||||
)
|
||||
.filter(Boolean),
|
||||
),
|
||||
generate: () => of(short().generate()),
|
||||
isIdentifier: true,
|
||||
}),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user