fix publishers api
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@ -26,3 +26,5 @@ next-cart-app.zip
|
|||||||
certificates
|
certificates
|
||||||
content/output/*
|
content/output/*
|
||||||
baseUrl.txt
|
baseUrl.txt
|
||||||
|
content/publisherShiftStats.json
|
||||||
|
content/publisherShiftStats.json
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -5,8 +5,7 @@
|
|||||||
"html.format.wrapAttributes": "force",
|
"html.format.wrapAttributes": "force",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll": true,
|
"source.fixAll": "explicit"
|
||||||
// "source.organizeImports": true
|
|
||||||
},
|
},
|
||||||
"[dotenv]": {
|
"[dotenv]": {
|
||||||
"editor.defaultFormatter": "foxundermoon.shell-format"
|
"editor.defaultFormatter": "foxundermoon.shell-format"
|
||||||
|
@ -312,8 +312,8 @@ export async function filterPublishers(selectFields, searchText, filterDate, fet
|
|||||||
id: String(id)
|
id: String(id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const searchTextString = String(searchText).trim();
|
const searchTextString = String(searchText || "").trim();
|
||||||
if (searchTextString) {
|
if (searchTextString !== "") {
|
||||||
whereClause = {
|
whereClause = {
|
||||||
OR: [
|
OR: [
|
||||||
{ firstName: { contains: searchTextString } },
|
{ firstName: { contains: searchTextString } },
|
||||||
|
@ -68,8 +68,7 @@ function PublishersPage({ publishers = [] }: IProps) {
|
|||||||
} else {
|
} else {
|
||||||
similarity = 1 - (distance - lenDiff) / distance;
|
similarity = 1 - (distance - lenDiff) / distance;
|
||||||
}
|
}
|
||||||
|
//console.log("distance: " + distance + "; lenDiff: " + lenDiff + " similarity: " + similarity + "; " + fullName + " =? " + filter + "")
|
||||||
console.log("distance: " + distance + "; lenDiff: " + lenDiff + " similarity: " + similarity + "; " + fullName + " =? " + filter + "")
|
|
||||||
return similarity >= 0.95;
|
return similarity >= 0.95;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -191,7 +190,7 @@ function PublishersPage({ publishers = [] }: IProps) {
|
|||||||
{renderPublishers()}
|
{renderPublishers()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ProtectedRoute>
|
</ProtectedRoute>
|
||||||
</Layout>
|
</Layout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user