/** * Based on the dashboard and minority type, * this will return either a link or just the M/WBE category name. * * NYCCHKBK-4676: * Do not hyperlink the M/WBE category within Top 5 Sub vendors widget if you are looking at prime data[M/WBE Featured Dashboard]. * Do not hyperlink the M/WBE category within Top 5 Prime vendors widget if you are looking at sub data[M/WBE(sub vendors) featured dashboard]. * The Details link from these widgets, also should follow same rule of not hyperlinking the M/WBE category. * NYCCHKBK-4798: * From Top 5 Sub vendors widget, link should go to SP to maintain correct data * @param $node * @param $row * @return string */ public static function getMWBECategory($node, $row) { $minority_type_id = isset($row["prime_minority_type_prime_minority_type"]) ? $row["prime_minority_type_prime_minority_type"] : $row["minority_type_minority_type"]; $minority_category = MappingUtil::getMinorityCategoryById($minority_type_id); $is_mwbe_certified = MappingUtil::isMWBECertified(array($minority_type_id)); $dtsmnid = _getRequestParamValue("dtsmnid"); $smnid = _getRequestParamValue("smnid"); $dashboard = _getRequestParamValue("dashboard"); if ($dtsmnid != null) { $nid = $dtsmnid; } else { if ($smnid != null) { $nid = $smnid; } else { $nid = $node->nid; } } $no_link = $dashboard == "mp" && $nid == 720; $no_link = $no_link || preg_match('/s/', $dashboard) && ($nid == 725 || $nid == 783); $dashboard = preg_match('/p/', $dashboard) ? "mp" : "ms"; //From sub vendors widget if ($nid == 720) { $dashboard = "sp"; } $showLink = !RequestUtil::isNewWindow() && $is_mwbe_certified && !$no_link; if (!$showLink) { $return_value = $minority_category; } else { $return_value = '<a href="/contracts_landing' . _checkbook_project_get_year_url_param_string() . _checkbook_project_get_url_param_string("agency") . _checkbook_project_get_url_param_string("cindustry") . _checkbook_project_get_url_param_string("csize") . _checkbook_project_get_url_param_string("awdmethod") . _checkbook_project_get_url_param_string("contstatus", "status") . _checkbook_project_get_url_param_string("vendor") . _checkbook_project_get_url_param_string("subvendor") . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_id . '?expandBottomCont=true">' . $minority_category . '</a>'; } return $return_value; }
/** * Returns true/false if M/WBE Category should be a link * * @param $node * @param $row * @return string */ static function showMWBECategoryLink($node, $row) { $dtsmnid = _getRequestParamValue("dtsmnid"); $smnid = _getRequestParamValue("smnid"); $showLink = !RequestUtil::isNewWindow() && MappingUtil::isMWBECertified(array($row['minority_type_id'])) && $dtsmnid != 763 && $smnid != 763 && $dtsmnid != 747 && $smnid != 747 && $dtsmnid != 717 && $smnid != 717; return $showLink; }
static function prepareSpendingContractTransactionsLink($row, $node) { $link = NULL; $docType = $row['document_code@checkbook:ref_document_code']; if (RequestUtil::isExpandBottomContainer()) { $link = '<a href=/panel_html/contract_transactions/contract_details/agid/' . $row['disb_agreement_id'] . '/doctype/' . $docType . _checkbook_append_url_params() . ' class=bottomContainerReload>' . $row['disb_contract_number'] . '</a>'; } else { if (RequestUtil::isNewWindow()) { $link = '<span href=/contracts_landing/status/A' . _checkbook_project_get_year_url_param_string() . '?expandBottomContURL=/panel_html/contract_transactions/contract_details/agid/' . $row['disb_agreement_id'] . '/doctype/' . $docType . _checkbook_append_url_params() . ' class=loadParentWindow>' . $row['disb_contract_number'] . '</span>'; } else { $link = '<a href=/contracts_landing/status/A' . _checkbook_project_get_year_url_param_string() . '?expandBottomContURL=/panel_html/contract_transactions/contract_details/agid/' . $row['disb_agreement_id'] . '/doctype/' . $docType . _checkbook_append_url_params() . ' >' . $row['disb_contract_number'] . '</a>'; } } return $link; }