In order to implement enable/disable button functionality please use the "enabled" property of the button. Bind this property to the method that will check some conditions and return true or false.
Please feel free to use the example below. In the example the "Quote" button is enabled when "Category" is "Enterprise" and disabled in other cases - https://prnt.sc/qrbpql
define("OpportunityPageV2", [], function() {
return {
entitySchemaName: "Opportunity",
methods: {
onNewQuoteClick: function() {
this.showInformationDialog("Hello");
},
isEnterpriseCategory: function() {
var result = false;
if(this.get("Category")){
result = this.get("Category").value === "385e1034-b68e-4e45-b3c3-25b164235f99";//Enterprise