Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,10 @@ <h3 class="font-bold text-lg dark:text-white">
data-cy="newTierPricing"
type="button"
(click)="openTierPricingDrawer()"
[disabled]="!hasRangeCharacteristics()"
[ngClass]="hasRangeCharacteristics() ? 'bg-green-500 hover:bg-green-600 cursor-pointer' : 'bg-gray-400 cursor-not-allowed opacity-50'"
[disabled]="!hasRangeCharacteristics() || hasProfilePricePlan()"
[ngClass]="hasRangeCharacteristics() && !hasProfilePricePlan() ? 'bg-green-500 hover:bg-green-600 cursor-pointer' : 'bg-gray-400 cursor-not-allowed opacity-50'"
class="mt-2 px-4 py-2 text-white rounded flex items-center"
[title]="!hasRangeCharacteristics() ? 'No range characteristics available in product specification' : 'Create tier pricing based on range characteristics'"
[title]="hasProfilePricePlan() ? 'Tier pricing is not available when a configuration profile is set' : (!hasRangeCharacteristics() ? 'No range characteristics available in product specification' : 'Create tier pricing based on range characteristics')"
>
<svg class="min-w-4 w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,4 +423,9 @@ export class PricePlanDrawerComponent implements OnInit, OnDestroy {
});
}

hasProfilePricePlan(): boolean {
const profileData = this.formGroup?.get('prodSpecCharValueUse')?.value;
return profileData && profileData.length > 0;
}

}
Loading