Small script and template changes. Nothing monumental.

This commit is contained in:
Norm Rasmussen
2023-06-19 22:25:46 -04:00
parent b526e92bfc
commit 3dd1fc3ffa
4 changed files with 3140 additions and 11 deletions

View File

@ -0,0 +1,34 @@
<div class="np-card np-search-result">
<div class="np-card-container">
<div class="np-card-content">
<img
class="np-search-result-image"
alt="{{ result.name }}"
src="{{ result.image_url }}"
/>
<div class="np-search-result-content">
<div>
<a class="np-search-result-title" href="{{ result.path }}">
{{ result.name }}
<span class="link"></span>
</a>
</div>
<div class="np-search-result-snippet">{{ result.sanitized_description }}</div>
</div>
</div>
</div>
</div>
{% comment %}
The styling below and the additional span is to make the entire div clickable as requested by the client.
{% endcomment %}
<style>
.link {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: 1;
}
</style>

View File

@ -4,7 +4,7 @@ const apiKey = 'XeRrtgm0BFYPjOjPekVwCdGkW';
function getUuids() { function getUuids() {
var sheet = SpreadsheetApp.getActiveSheet(); var sheet = SpreadsheetApp.getActiveSheet();
var numRows = sheet.getLastRow()-1; // Number of rows to process var numRows = sheet.getLastRow()-1; // Number of rows to process
var dataRange = sheet.getRange(2, 2, numRows, 1); var dataRange = sheet.getRange(2, 3, numRows, 1);
var values = dataRange.getValues(); var values = dataRange.getValues();
writeHeadings(); writeHeadings();
@ -44,8 +44,7 @@ function findRow(email, uuid){
var sheetRow = SpreadsheetApp.getActiveSpreadsheet(); var sheetRow = SpreadsheetApp.getActiveSpreadsheet();
var data = sheetRow.getDataRange().getValues(); var data = sheetRow.getDataRange().getValues();
for(var i = 0; i<data.length;i++){ for(var i = 0; i<data.length;i++){
if(data[i][1] == email){ //[1] because column B if(data[i][2] == email){ //[1] because column B
Logger.log((i+1))
var row = i+1; var row = i+1;
propstoSheet(uuid, row, email); propstoSheet(uuid, row, email);
} }
@ -73,15 +72,15 @@ function propstoSheet(uuid, row, email) {
var paid = parseProps["data"]["attributes"]["properties"]["store_name"]; var paid = parseProps["data"]["attributes"]["properties"]["store_name"];
// Write the Data to each row and column // Write the Data to each row and column
sheet.getRange(row, 5).setValue(role); sheet.getRange(row, 6).setValue(role);
sheet.getRange(row, 6).setValue(user_id); sheet.getRange(row, 7).setValue(user_id);
sheet.getRange(row, 7).setValue(paid); sheet.getRange(row, 8).setValue(paid);
// Logger.log(row + "," + email); // Logger.log(row + "," + email);
} }
function writeHeadings() { function writeHeadings() {
// Write the new Column Headings // Write the new Column Headings
sheet.getRange(1, 5).setValue("City"); sheet.getRange(1, 6).setValue("City");
sheet.getRange(1, 6).setValue("State"); sheet.getRange(1, 7).setValue("State");
sheet.getRange(1, 7).setValue("Store Name"); sheet.getRange(1, 8).setValue("Store Name");
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* Hello, Tracy! Welcome to the Harri script! /* Hello, Tracy! Welcome to the Harri script!
Please save this script in a specific folder. That folder should be: ~/Documents/Harri/ Please save this script in a specific folder. That folder should be: ~/Documents/Harri/
@ -99,4 +99,4 @@ function csvReader(someArray, filePath) {
}) })
} }
csvReader(array, "~/Documents/Harri/Harri Activation Report - 2023.05.31.csv") csvReader(array, "/Users/normrasmussen/Downloads/Harri Activation Report - 2023.06.19.csv")