From a802fbdd0d0652bcab6da2dc72239b1375537b98 Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 9 Feb 2024 22:33:53 -0500 Subject: [PATCH 01/22] added subtab HTML --- farmdata2/farmdata2_modules/fd2_school/fd2_school.module | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module index 167ca8ef..51187a45 100644 --- a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module +++ b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module @@ -62,6 +62,15 @@ function fd2_school_menu() { // Add items blocks for new sub-tabs here. + $items['farm/fd2-school/HTML'] = array( // Put the school in the farm menu + 'title' => 'HTML', // Put FD2 School on the tab + 'page callback' => 'fd2_school_view', // The function that will provide the content + 'page arguments' => array('HTML'), // The html file with the default content for the tab + 'access arguments' => array('view fd2 school'), // permissions required to view the tab + 'type' => MENU_LOCAL_TASK, // Put it on the menu + 'weight' => 110, // larger weights appear further right. + ); + return $items; }; From 7368dee7df011d5e886ab6adaea21d3f222f0d8f Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 9 Feb 2024 22:55:38 -0500 Subject: [PATCH 02/22] adding HTML file --- farmdata2/farmdata2_modules/fd2_school/fd2_school.module | 9 --------- 1 file changed, 9 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module index 51187a45..167ca8ef 100644 --- a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module +++ b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module @@ -62,15 +62,6 @@ function fd2_school_menu() { // Add items blocks for new sub-tabs here. - $items['farm/fd2-school/HTML'] = array( // Put the school in the farm menu - 'title' => 'HTML', // Put FD2 School on the tab - 'page callback' => 'fd2_school_view', // The function that will provide the content - 'page arguments' => array('HTML'), // The html file with the default content for the tab - 'access arguments' => array('view fd2 school'), // permissions required to view the tab - 'type' => MENU_LOCAL_TASK, // Put it on the menu - 'weight' => 110, // larger weights appear further right. - ); - return $items; }; From b1758b3f0ce0d498ba2feaeac5e742d93822d0f2 Mon Sep 17 00:00:00 2001 From: jadoont Date: Mon, 19 Feb 2024 14:30:47 -0500 Subject: [PATCH 03/22] test commit from office hours --- farmdata2/farmdata2_modules/fd2_school/HTML/HTML.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 farmdata2/farmdata2_modules/fd2_school/HTML/HTML.html diff --git a/farmdata2/farmdata2_modules/fd2_school/HTML/HTML.html b/farmdata2/farmdata2_modules/fd2_school/HTML/HTML.html new file mode 100644 index 00000000..d2a15315 --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_school/HTML/HTML.html @@ -0,0 +1 @@ +

This is my subtab

\ No newline at end of file From f831967b604ada7a9fa949e89e8848c7f06f163d Mon Sep 17 00:00:00 2001 From: jadoont Date: Mon, 15 Apr 2024 01:03:29 -0400 Subject: [PATCH 04/22] Added HTML sub-tab to FD2 School Tab --- .../farmdata2_modules/fd2_school/fd2_school.module | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module index 167ca8ef..08cc6ed9 100644 --- a/farmdata2/farmdata2_modules/fd2_school/fd2_school.module +++ b/farmdata2/farmdata2_modules/fd2_school/fd2_school.module @@ -60,8 +60,15 @@ function fd2_school_menu() { 'weight' => -100, ); - // Add items blocks for new sub-tabs here. - + $items['farm/fd2-school/html'] = array ( + 'title' => 'HTML', + 'type' => MENU_LOCAL_TASK, + 'page callback' => 'fd2_school_view', + 'page arguments' => array('HTML'), + 'access arguments' => array('view fd2 school'), + 'weight' => 110 + ); + return $items; }; From fe36399e2daad682fea2008c5b6573dbcc1c5afe Mon Sep 17 00:00:00 2001 From: jadoont Date: Sun, 21 Apr 2024 16:52:52 -0400 Subject: [PATCH 05/22] Update Harvest Report --- .../farmdata2_modules/fd2_school/html.html | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 farmdata2/farmdata2_modules/fd2_school/html.html diff --git a/farmdata2/farmdata2_modules/fd2_school/html.html b/farmdata2/farmdata2_modules/fd2_school/html.html new file mode 100644 index 00000000..472a99ea --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_school/html.html @@ -0,0 +1,32 @@ + + + + + + Harvest Report + + + +

Harvest Report

+

My Sample Harvest Report

+
    +
  • Temperature: 75°F
  • +
  • Humidity: 60%
  • +
  • Soil Moisture: 40%
  • +
  • Precipitation: 0.25 inches
  • +
+ + From fc548c296f3859788dead9bb578b096960f51e68 Mon Sep 17 00:00:00 2001 From: jadoont Date: Sun, 21 Apr 2024 21:10:35 -0400 Subject: [PATCH 06/22] added breaks and fonts --- .../farmdata2_modules/fd2_school/html.html | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/html.html b/farmdata2/farmdata2_modules/fd2_school/html.html index 472a99ea..57afcca5 100644 --- a/farmdata2/farmdata2_modules/fd2_school/html.html +++ b/farmdata2/farmdata2_modules/fd2_school/html.html @@ -1,3 +1,4 @@ + @@ -5,7 +6,17 @@ Harvest Report @@ -57,6 +70,37 @@

Harvest Report Form


Actual Report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateFieldCropQuantity (lbs)Worker
2020-05-01Chuau-1Kale50John Doe
2020-05-05SQ7Broccoli40Jane Smith
2020-05-10Chuau-1Peas30Michael Johnson
+ From 9965157d4e10076a2c7617615447b51c4284ec35 Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 00:11:04 -0400 Subject: [PATCH 10/22] added a new subtab vue1 to the school tab --- .../fd2_school/vue1/vue1.html | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html new file mode 100644 index 00000000..fd6e1a49 --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -0,0 +1,106 @@ + + + + + + Harvest Report + + + +

Harvest Report

+ mockup +
+

Harvest Report Form

+
+ +

+ +

+ +

+ +

+
+

+ +
+
+

Actual Report

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DateFieldCropQuantity (lbs)Worker
2020-05-01Chuau-1Kale50John Doe
2020-05-05SQ7Broccoli40Jane Smith
2020-05-10Chuau-1Peas30Michael Johnson
+ + + + From 3207415981daeccf630374ea89a0c9f54de6a542 Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 00:19:19 -0400 Subject: [PATCH 11/22] Added basic Vue capabilities to vue1.html --- .../fd2_school/vue1/vue1.html | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html index fd6e1a49..51ed8835 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -1,5 +1,26 @@ +
+ +

{{ reportTitle }}

+
+ + + + From 93af8f614273e14148561915742f3599d42c6820 Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 00:32:07 -0400 Subject: [PATCH 12/22] Added Vue bindings for report start date, end date, and selected crop --- .../fd2_school/vue1/vue1.html | 119 +++++++----------- 1 file changed, 47 insertions(+), 72 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html index 51ed8835..ef036001 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -1,73 +1,34 @@ + - -
- -

{{ reportTitle }}

-
- - - - - - - Harvest Report - + + + Vue1 Harvest Report + -

Harvest Report

- mockup -
-

Harvest Report Form

+ +
+ + + + +

Report Start Date: {{ reportStartDate }}

+

Report End Date: {{ reportEndDate }}

+

Selected Crop: {{ selectedCrop }}

+
+ + +

Harvest Report Form

+


-
-

Actual Report

- + + + +
+

Actual Report

+
@@ -120,8 +84,19 @@

Actual Report

-
Date Field 30 Michael Johnson
- - + + + + + From 39407c642aacaa3a72a9ede9c376c706084d0806 Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 00:43:27 -0400 Subject: [PATCH 13/22] add terenary statements to set to mock harvest report --- farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html index ef036001..8f17749a 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -1,5 +1,5 @@ - + @@ -24,6 +24,10 @@

Report Start Date: {{ reportStartDate }}

Report End Date: {{ reportEndDate }}

Selected Crop: {{ selectedCrop }}

+ + +

+

{{ reportTitle !== '' ? reportTitle : 'Mock Harvest Report' }}

@@ -94,7 +98,8 @@

Actual Report

data: { reportStartDate: '', reportEndDate: '', - selectedCrop: '' + selectedCrop: '', + reportTitle: '' } }); From 60cd52254da55556838eda3ea756afe42a55ba3f Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 00:53:46 -0400 Subject: [PATCH 14/22] adding areas with drop down --- .../fd2_school/vue1/vue1.html | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html index 8f17749a..b195a2b7 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -16,14 +16,16 @@ +

Report Start Date: {{ reportStartDate }}

Report End Date: {{ reportEndDate }}

Selected Crop: {{ selectedCrop }}

+

Selected Area: {{ selectedArea }}



@@ -36,15 +38,12 @@

Harvest Report Form



+



@@ -53,7 +52,7 @@

Harvest Report Form




-
+ @@ -105,3 +104,9 @@

Actual Report

+ + + + + + From 2b8e523fab30a9e0dc61957e48eefa09b4d3b608 Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 01:00:49 -0400 Subject: [PATCH 15/22] added harvest log objects --- .../fd2_school/vue1/vue1.html | 47 ++++++++----------- 1 file changed, 20 insertions(+), 27 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html index b195a2b7..756eca79 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -37,20 +37,20 @@

Harvest Report Form

-

-

-

+

-

+


-

+

@@ -66,28 +66,13 @@

Actual Report

Quantity (lbs) Worker - - 2020-05-01 - Chuau-1 - Kale - 50 - John Doe - - - 2020-05-05 - SQ7 - Broccoli - 40 - Jane Smith + + {{ log.date }} + {{ log.area }} + {{ log.crop }} + {{ log.quantity }} + {{ log.worker }} - - 2020-05-10 - Chuau-1 - Peas - 30 - Michael Johnson - - @@ -98,7 +83,15 @@

Actual Report

reportStartDate: '', reportEndDate: '', selectedCrop: '', - reportTitle: '' + selectedArea: '', + reportTitle: '', + crops: ["Broccoli", "Kale", "Peas"], + areas: ["Chuau-1", "SQ7"], + harvestLogs: [ + { date: "2020-05-01", area: "Chuau-1", crop: "Kale", quantity: 50, worker: "John Doe" }, + { date: "2020-05-05", area: "SQ7", crop: "Broccoli", quantity: 40, worker: "Jane Smith" }, + { date: "2020-05-10", area: "Chuau-1", crop: "Peas", quantity: 30, worker: "Michael Johnson" } + ] } }); From 22a0e6c5dd91939766590c5ba5e1e33edd02462f Mon Sep 17 00:00:00 2001 From: jadoont Date: Fri, 26 Apr 2024 01:03:44 -0400 Subject: [PATCH 16/22] added vue dev tools --- farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html index 756eca79..2aff0d54 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue1/vue1.html @@ -94,6 +94,8 @@

Actual Report

] } }); + Vue.config.devtools = true; + From 94c500396ac861a1682e4ab5f907ad2ac6a97c6a Mon Sep 17 00:00:00 2001 From: jadoont Date: Sat, 27 Apr 2024 19:24:20 -0400 Subject: [PATCH 17/22] added vue2 directory and vue2.html --- .../fd2_school/vue2/vue2.html | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html diff --git a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html new file mode 100644 index 00000000..bc636f91 --- /dev/null +++ b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html @@ -0,0 +1,101 @@ + + + + + + Vue1 Harvest Report + + + + +
+ + + + + +

Report Start Date: {{ reportStartDate }}

+

Report End Date: {{ reportEndDate }}

+

Selected Crop: {{ selectedCrop }}

+

Selected Area: {{ selectedArea }}

+ + +

+

{{ reportTitle !== '' ? reportTitle : 'Mock Harvest Report' }}

+
+ + +

Harvest Report Form

+
+ + +

+ + +

+ +

+ +

+
+

+ +
+ + + +
+

Actual Report

+ + + + + + + + + + + + + + + +
DateFieldCropQuantity (lbs)Worker
{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.quantity }}{{ log.worker }}
+ + + + + From 95858dc42fbcf0be5dc5ee12f4c022a3d7af0750 Mon Sep 17 00:00:00 2001 From: jadoont Date: Sat, 27 Apr 2024 19:59:23 -0400 Subject: [PATCH 18/22] adds empty rows on click --- .../fd2_school/vue2/vue2.html | 78 ++++++++++--------- 1 file changed, 40 insertions(+), 38 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html index bc636f91..b2d5359b 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html @@ -35,44 +35,42 @@

{{ reportTitle !== '' ? reportTitle : 'Mock Harvest Report' }}

Harvest Report Form

- - -

- - -

- -

- -

-
-

- -
+ +

+ + +

+ +

+ +

+
+

+

Actual Report

- - - - - - - - - - - - - - + + + + + + + + + + + + + +
DateFieldCropQuantity (lbs)Worker
{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.quantity }}{{ log.worker }}
DateFieldCropYieldsUnit
{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.yields }}{{ log.unit }}
@@ -87,15 +85,19 @@

Actual Report

reportTitle: '', crops: ["Broccoli", "Kale", "Peas"], areas: ["Chuau-1", "SQ7"], - harvestLogs: [ - { date: "2020-05-01", area: "Chuau-1", crop: "Kale", quantity: 50, worker: "John Doe" }, - { date: "2020-05-05", area: "SQ7", crop: "Broccoli", quantity: 40, worker: "Jane Smith" }, - { date: "2020-05-10", area: "Chuau-1", crop: "Peas", quantity: 30, worker: "Michael Johnson" } - ] + harvestLogs: [] } }); - Vue.config.devtools = true; + function addEmptyRow() { + app.harvestLogs.push({ + date: '', + area: '', + crop: '', + yields: '', + unit: '' + }); + } From 4240108da50e1c00d4bf3cd6d20c7002f93fe0f0 Mon Sep 17 00:00:00 2001 From: jadoont Date: Sat, 27 Apr 2024 20:11:13 -0400 Subject: [PATCH 19/22] additional clicks do not do anything --- .../fd2_school/vue2/vue2.html | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html index b2d5359b..6676d585 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html @@ -50,7 +50,7 @@

Harvest Report Form






- + @@ -86,18 +86,19 @@

Actual Report

crops: ["Broccoli", "Kale", "Peas"], areas: ["Chuau-1", "SQ7"], harvestLogs: [] + }, + methods: { + generateReport: function() { + this.harvestLogs.push({ + date: '', + area: '', + crop: '', + yields: '', + unit: '' + }); + } } }); - - function addEmptyRow() { - app.harvestLogs.push({ - date: '', - area: '', - crop: '', - yields: '', - unit: '' - }); - } From 0097ab8b7d73a1e692805c1807957a1204f989e3 Mon Sep 17 00:00:00 2001 From: jadoont Date: Sat, 27 Apr 2024 20:46:26 -0400 Subject: [PATCH 20/22] adds indices --- .../fd2_school/vue2/vue2.html | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html index 6676d585..a2e9254f 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html @@ -57,20 +57,26 @@

Harvest Report Form


Actual Report

- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + +
DateFieldCropYieldsUnit
{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.yields }}{{ log.unit }}
RowDateFieldCropYieldsUnit
{{ index + 1 }}{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.yields }}{{ log.unit }}
From 664d6d4549ef3e64390a6985d5322a4760589a56 Mon Sep 17 00:00:00 2001 From: jadoont Date: Sat, 27 Apr 2024 21:19:08 -0400 Subject: [PATCH 21/22] no matching records if there is nothing to be displayed --- .../fd2_school/vue2/vue2.html | 55 +++++++++++-------- 1 file changed, 31 insertions(+), 24 deletions(-) diff --git a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html index a2e9254f..163f73cd 100644 --- a/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html +++ b/farmdata2/farmdata2_modules/fd2_school/vue2/vue2.html @@ -13,6 +13,7 @@
+ - + + @@ -46,44 +45,33 @@

Harvest Report Form



-

+

-

+




- -

Actual Report

-
- - - - - - - - - - - - - - - - - - - - - -
RowDateFieldCropYieldsUnit
{{ index + 1 }}{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.yields }}{{ log.unit }}
-
-
-

No matching records found.

- +
+

Actual Report

+ + + + + + + + + + + + + + + +
DateFieldCropYieldsUnit
{{ log.date }}{{ log.area }}{{ log.crop }}{{ log.yields }}{{ log.unit }}