diff --git a/app.js b/app.js
index bca0c00..2bd3f6f 100644
--- a/app.js
+++ b/app.js
@@ -311,7 +311,7 @@ function dnsRender() {
.getElementById("dns-filter-type")
.value.toUpperCase();
- const HIDDEN_NAMES = ["fr", "n8n", "admin", "app", "@"];
+ const HIDDEN_NAMES = ["fr", "n8n", "usa", "admin", "app", "@"];
const filtered = dnsRecords.filter((r) => {
const name = r.name.toLowerCase();
@@ -1419,6 +1419,9 @@ function crmRender() {
const searchCategory = (
document.getElementById("crm-search-category")?.value ?? ""
).toLowerCase();
+ const searchAffiliate = (
+ document.getElementById("crm-search-affiliate")?.value ?? ""
+ ).toLowerCase();
let filtered = crmRecords.filter((r) => {
const name = (r.Name ?? "").toLowerCase();
@@ -1427,13 +1430,15 @@ function crmRender() {
const stage = (r.Stage ?? "").toLowerCase();
const strategy = (r.strategy ?? "").toLowerCase();
const category = (r.category ?? "").toLowerCase();
+ const affiliate = (r.affiliate ?? "").toLowerCase();
return (
(!searchName || name.includes(searchName)) &&
(!searchCompany || company.includes(searchCompany)) &&
(!searchEmail || email.includes(searchEmail)) &&
(!searchStage || stage.includes(searchStage)) &&
(!searchStrategy || strategy.includes(searchStrategy)) &&
- (!searchCategory || category.includes(searchCategory))
+ (!searchCategory || category.includes(searchCategory)) &&
+ (!searchAffiliate || affiliate.includes(searchAffiliate))
);
});
@@ -1467,7 +1472,7 @@ function crmRender() {
const tbody = document.getElementById("crm-table-body");
if (filtered.length === 0) {
- tbody.innerHTML = `
+ tbody.innerHTML = `
| `;
})
@@ -1509,6 +1515,23 @@ function crmRender() {
crmUpdateDeleteBtn();
}
+/* ─── CRM — Clear all filters ──────────────────────────────────── */
+function crmClearFilters() {
+ [
+ "name",
+ "company",
+ "email",
+ "stage",
+ "strategy",
+ "category",
+ "affiliate",
+ ].forEach((f) => {
+ const el = document.getElementById("crm-search-" + f);
+ if (el) el.value = "";
+ });
+ crmRender();
+}
+
/* ─── CRM — Sort ───────────────────────────────────────────────── */
function crmToggleSort(key) {
if (crmSortKey === key) {
diff --git a/index.html b/index.html
index 913b0bd..7d9a638 100644
--- a/index.html
+++ b/index.html
@@ -798,72 +798,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -991,6 +925,21 @@
data-sort="category"
>
+ |
+ Referral
+
+ |
+ | |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+ |
+
|
diff --git a/styles.css b/styles.css
index 77fb40a..88090fb 100644
--- a/styles.css
+++ b/styles.css
@@ -819,3 +819,24 @@ hr.sep {
font-size: 13px;
padding: 3px 0;
}
+
+/* ─── CRM filter inputs ──────────────────────────────────── */
+.crm-filter-input {
+ width: 100%;
+ box-sizing: border-box;
+ background: var(--bg-input);
+ border: 1px solid var(--border);
+ color: var(--text);
+ border-radius: 4px;
+ padding: 4px 6px;
+ font-size: 12px;
+ font-family: inherit;
+}
+.crm-filter-input:focus {
+ outline: none;
+ border-color: var(--border-hi);
+}
+.crm-search-row th {
+ padding: 6px 4px;
+ vertical-align: middle;
+}
|