@bendyline/gilde 0.3.16 → 0.3.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/authoring/chat-models/inkling2-mini-26b-nvfp4.json +26 -0
- package/authoring/chat-models/kolibri-1.1-75b-iq2.json +1 -1
- package/authoring/chat-models/minicpm5-15b-a2.5b-q4.json +138 -0
- package/authoring/chat-models/qwen3.8-flash-next-iq4.json +4 -14
- package/authoring/chat-models/qwen4-35b-a3b-q4.json +200 -0
- package/authoring/chat-models/spark-x2.6-4b-q4.json +26 -0
- package/data/chat-models/in/inkling2-mini-26b-nvfp4/manifest.json +26 -0
- package/data/chat-models/index.json +1 -1
- package/data/chat-models/ko/kolibri-1.1-75b-iq2/manifest.json +1 -1
- package/data/chat-models/mi/minicpm5-15b-a2.5b-q4/manifest.json +186 -0
- package/data/chat-models/mi/minicpm5-15b-a2.5b-q4/versions/1.0.0/manifest.json +64 -0
- package/data/chat-models/mi/minicpm5-15b-a2.5b-q4/versions/1.0.1/manifest.json +64 -0
- package/data/chat-models/qw/qwen3.8-flash-next-iq4/manifest.json +3 -211
- package/data/chat-models/qw/qwen3.8-flash-next-iq4/versions/1.1.2/manifest.json +36 -0
- package/data/chat-models/qw/qwen4-35b-a3b-q4/manifest.json +317 -0
- package/data/chat-models/qw/qwen4-35b-a3b-q4/versions/1.0.0/manifest.json +120 -0
- package/data/chat-models/qw/qwen4-35b-a3b-q4/versions/1.0.1/manifest.json +135 -0
- package/data/chat-models/raw-index.json +1 -1
- package/data/chat-models/sp/spark-x2.6-4b-q4/manifest.json +26 -0
- package/data/craftbook-templates/al/album-curate/versions/1.0.6/craftbook.json +344 -0
- package/data/craftbook-templates/al/album-curate/versions/1.0.6/test.json +160 -0
- package/data/craftbook-templates/al/album-curate/versions/1.0.7/craftbook.json +362 -0
- package/data/craftbook-templates/al/album-curate/versions/1.0.7/test.json +192 -0
- package/data/craftbook-templates/an/annual-document-review/versions/1.0.5/craftbook.json +306 -0
- package/data/craftbook-templates/an/annual-document-review/versions/1.0.5/test.json +115 -0
- package/data/craftbook-templates/ce/celebration-day-plan/manifest.json +22 -0
- package/data/craftbook-templates/ce/celebration-day-plan/versions/1.0.0/craftbook.json +242 -0
- package/data/craftbook-templates/ce/celebration-day-plan/versions/1.0.0/test.json +118 -0
- package/data/craftbook-templates/da/dataset-clean/versions/1.2.7/craftbook.json +263 -0
- package/data/craftbook-templates/da/dataset-clean/versions/1.2.7/test.json +111 -0
- package/data/craftbook-templates/em/email-template/versions/1.0.6/craftbook.json +335 -0
- package/data/craftbook-templates/em/email-template/versions/1.0.6/test.json +112 -0
- package/data/craftbook-templates/ex/expense-categorize/manifest.json +0 -5
- package/data/craftbook-templates/ex/expense-categorize/versions/1.0.7/craftbook.json +306 -0
- package/data/craftbook-templates/ex/expense-categorize/versions/1.0.7/test.json +120 -0
- package/data/craftbook-templates/ex/expense-categorize/versions/1.0.9/craftbook.json +330 -0
- package/data/craftbook-templates/ex/expense-categorize/versions/1.0.9/test.json +120 -0
- package/data/craftbook-templates/fa/family-story-chapter/manifest.json +0 -5
- package/data/craftbook-templates/fa/family-story-chapter/versions/1.0.6/craftbook.json +213 -0
- package/data/craftbook-templates/fa/family-story-chapter/versions/1.0.6/test.json +118 -0
- package/data/craftbook-templates/fa/family-story-chapter/versions/1.0.7/craftbook.json +249 -0
- package/data/craftbook-templates/fa/family-story-chapter/versions/1.0.7/test.json +121 -0
- package/data/craftbook-templates/fa/family-story-chapter/versions/1.0.8/craftbook.json +269 -0
- package/data/craftbook-templates/fa/family-story-chapter/versions/1.0.8/test.json +147 -0
- package/data/craftbook-templates/fa/faq-from-docs/versions/1.1.3/craftbook.json +275 -0
- package/data/craftbook-templates/fa/faq-from-docs/versions/1.1.3/test.json +116 -0
- package/data/craftbook-templates/fo/folder-to-audio/versions/1.0.6/craftbook.json +263 -0
- package/data/craftbook-templates/fo/folder-to-audio/versions/1.0.6/test.json +114 -0
- package/data/craftbook-templates/in/inbox-triage/manifest.json +0 -4
- package/data/craftbook-templates/in/inbox-triage/versions/1.0.6/craftbook.json +305 -0
- package/data/craftbook-templates/in/inbox-triage/versions/1.0.6/test.json +175 -0
- package/data/craftbook-templates/in/inbox-triage/versions/1.0.7/craftbook.json +311 -0
- package/data/craftbook-templates/in/inbox-triage/versions/1.0.7/test.json +189 -0
- package/data/craftbook-templates/in/invoice-generator/manifest.json +0 -4
- package/data/craftbook-templates/in/invoice-generator/versions/1.0.6/craftbook.json +246 -0
- package/data/craftbook-templates/in/invoice-generator/versions/1.0.6/test.json +183 -0
- package/data/craftbook-templates/index.json +1 -1
- package/data/craftbook-templates/me/meeting-minutes/manifest.json +1 -5
- package/data/craftbook-templates/me/meeting-minutes/versions/1.1.3/craftbook.json +276 -0
- package/data/craftbook-templates/me/meeting-minutes/versions/1.1.3/test.json +97 -0
- package/data/craftbook-templates/me/meeting-minutes/versions/1.1.4/craftbook.json +272 -0
- package/data/craftbook-templates/me/meeting-minutes/versions/1.1.4/test.json +97 -0
- package/data/craftbook-templates/me/meeting-notes-to-actions/versions/1.1.4/craftbook.json +285 -0
- package/data/craftbook-templates/me/meeting-notes-to-actions/versions/1.1.4/samples/team-sync/notes.md +47 -0
- package/data/craftbook-templates/me/meeting-notes-to-actions/versions/1.1.4/test.json +90 -0
- package/data/craftbook-templates/me/memory-prompt-session/manifest.json +0 -4
- package/data/craftbook-templates/me/memory-prompt-session/versions/1.0.5/craftbook.json +317 -0
- package/data/craftbook-templates/me/memory-prompt-session/versions/1.0.5/test.json +237 -0
- package/data/craftbook-templates/mo/mock-interview/manifest.json +0 -4
- package/data/craftbook-templates/mo/mock-interview/versions/1.0.7/craftbook.json +352 -0
- package/data/craftbook-templates/mo/mock-interview/versions/1.0.7/test.json +209 -0
- package/data/craftbook-templates/of/offer-compare/versions/1.0.6/craftbook.json +244 -0
- package/data/craftbook-templates/of/offer-compare/versions/1.0.6/test.json +129 -0
- package/data/craftbook-templates/on/onboarding-checklist/versions/1.0.6/craftbook.json +248 -0
- package/data/craftbook-templates/on/onboarding-checklist/versions/1.0.6/test.json +101 -0
- package/data/craftbook-templates/ph/photo-cull/versions/1.0.6/craftbook.json +315 -0
- package/data/craftbook-templates/ph/photo-cull/versions/1.0.6/test.json +196 -0
- package/data/craftbook-templates/ph/photo-cull/versions/1.0.7/craftbook.json +336 -0
- package/data/craftbook-templates/ph/photo-cull/versions/1.0.7/test.json +204 -0
- package/data/craftbook-templates/pr/pre-departure-countdown/manifest.json +0 -1
- package/data/craftbook-templates/pr/pre-departure-countdown/versions/1.0.6/craftbook.json +306 -0
- package/data/craftbook-templates/pr/pre-departure-countdown/versions/1.0.6/test.json +119 -0
- package/data/craftbook-templates/pr/pre-departure-countdown/versions/1.0.7/craftbook.json +315 -0
- package/data/craftbook-templates/pr/pre-departure-countdown/versions/1.0.7/test.json +127 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.9.19/craftbook.json +611 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.9.19/test.json +156 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.9.20/craftbook.json +632 -0
- package/data/craftbook-templates/pu/pull-request-review/versions/1.9.20/test.json +156 -0
- package/data/craftbook-templates/raw-index.json +1 -1
- package/data/craftbook-templates/re/reading-list/versions/1.0.6/craftbook.json +247 -0
- package/data/craftbook-templates/re/reading-list/versions/1.0.6/test.json +101 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/manifest.json +0 -4
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.7/craftbook.json +312 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.7/test.json +160 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.8/craftbook.json +322 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.8/test.json +194 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.9/craftbook.json +353 -0
- package/data/craftbook-templates/re/receipt-ocr-ledger/versions/1.0.9/test.json +215 -0
- package/data/craftbook-templates/re/record-a-relative/manifest.json +0 -1
- package/data/craftbook-templates/re/record-a-relative/versions/1.0.5/craftbook.json +318 -0
- package/data/craftbook-templates/re/record-a-relative/versions/1.0.5/test.json +208 -0
- package/data/craftbook-templates/re/record-a-relative/versions/1.0.6/craftbook.json +381 -0
- package/data/craftbook-templates/re/record-a-relative/versions/1.0.6/test.json +224 -0
- package/data/craftbook-templates/re/resume-cv/manifest.json +1 -5
- package/data/craftbook-templates/re/resume-cv/versions/1.0.6/craftbook.json +310 -0
- package/data/craftbook-templates/re/resume-cv/versions/1.0.6/test.json +121 -0
- package/data/craftbook-templates/re/resume-cv/versions/1.0.7/craftbook.json +312 -0
- package/data/craftbook-templates/re/resume-cv/versions/1.0.7/test.json +129 -0
- package/data/craftbook-templates/re/resume-cv/versions/1.0.8/craftbook.json +329 -0
- package/data/craftbook-templates/re/resume-cv/versions/1.0.8/test.json +144 -0
- package/data/craftbook-templates/re/reviewer-loop/versions/1.0.4/craftbook.json +178 -0
- package/data/craftbook-templates/re/reviewer-loop/versions/1.0.4/test.json +117 -0
- package/data/craftbook-templates/ro/rough-cut-assembly/versions/1.0.7/craftbook.json +333 -0
- package/data/craftbook-templates/ro/rough-cut-assembly/versions/1.0.7/test.json +142 -0
- package/data/craftbook-templates/se/seasonal-maintenance-sweep/manifest.json +0 -1
- package/data/craftbook-templates/se/seasonal-maintenance-sweep/versions/1.0.6/craftbook.json +307 -0
- package/data/craftbook-templates/se/seasonal-maintenance-sweep/versions/1.0.6/test.json +121 -0
- package/data/craftbook-templates/se/seasonal-maintenance-sweep/versions/1.0.7/craftbook.json +314 -0
- package/data/craftbook-templates/se/seasonal-maintenance-sweep/versions/1.0.7/test.json +121 -0
- package/data/craftbook-templates/su/subscription-audit/manifest.json +0 -5
- package/data/craftbook-templates/su/subscription-audit/versions/1.0.6/craftbook.json +307 -0
- package/data/craftbook-templates/su/subscription-audit/versions/1.0.6/test.json +134 -0
- package/data/craftbook-templates/su/subscription-audit/versions/1.0.7/craftbook.json +300 -0
- package/data/craftbook-templates/su/subscription-audit/versions/1.0.7/test.json +140 -0
- package/data/craftbook-templates/su/subscription-audit/versions/1.0.8/craftbook.json +320 -0
- package/data/craftbook-templates/su/subscription-audit/versions/1.0.8/test.json +144 -0
- package/data/craftbook-templates/su/summarize-long/manifest.json +0 -1
- package/data/craftbook-templates/su/summarize-long/versions/1.0.7/craftbook.json +251 -0
- package/data/craftbook-templates/su/summarize-long/versions/1.0.7/test.json +115 -0
- package/data/craftbook-templates/su/summarize-long/versions/1.0.8/craftbook.json +261 -0
- package/data/craftbook-templates/su/summarize-long/versions/1.0.8/test.json +123 -0
- package/data/craftbook-templates/su/survey-analysis/versions/1.0.6/craftbook.json +345 -0
- package/data/craftbook-templates/su/survey-analysis/versions/1.0.6/test.json +214 -0
- package/data/craftbook-templates/su/survey-analysis/versions/1.0.7/craftbook.json +362 -0
- package/data/craftbook-templates/su/survey-analysis/versions/1.0.7/test.json +231 -0
- package/data/craftbook-templates/su/survey-analysis/versions/1.0.8/craftbook.json +378 -0
- package/data/craftbook-templates/su/survey-analysis/versions/1.0.8/test.json +240 -0
- package/data/craftbook-templates/ta/tailor-resume/manifest.json +0 -4
- package/data/craftbook-templates/ta/tailor-resume/versions/1.0.7/craftbook.json +255 -0
- package/data/craftbook-templates/ta/tailor-resume/versions/1.0.7/test.json +113 -0
- package/data/craftbook-templates/ta/tailor-resume/versions/1.0.8/craftbook.json +267 -0
- package/data/craftbook-templates/ta/tailor-resume/versions/1.0.8/test.json +120 -0
- package/data/craftbook-templates/ta/tailor-resume/versions/1.0.9/craftbook.json +278 -0
- package/data/craftbook-templates/ta/tailor-resume/versions/1.0.9/test.json +134 -0
- package/data/craftbook-templates/to/tone-rewrite/manifest.json +0 -1
- package/data/craftbook-templates/to/tone-rewrite/versions/1.0.6/craftbook.json +245 -0
- package/data/craftbook-templates/to/tone-rewrite/versions/1.0.6/test.json +120 -0
- package/data/craftbook-templates/to/tone-rewrite/versions/1.0.7/craftbook.json +243 -0
- package/data/craftbook-templates/to/tone-rewrite/versions/1.0.7/test.json +127 -0
- package/data/craftbook-templates/to/topic-explainer/versions/1.0.6/craftbook.json +319 -0
- package/data/craftbook-templates/to/topic-explainer/versions/1.0.6/test.json +124 -0
- package/data/craftbook-templates/to/topic-explainer/versions/1.0.7/craftbook.json +327 -0
- package/data/craftbook-templates/to/topic-explainer/versions/1.0.7/test.json +131 -0
- package/data/craftbook-templates/tr/transcribe-audio/manifest.json +0 -5
- package/data/craftbook-templates/tr/transcribe-audio/versions/1.0.6/craftbook.json +248 -0
- package/data/craftbook-templates/tr/transcribe-audio/versions/1.0.6/test.json +137 -0
- package/data/craftbook-templates/tr/transcribe-audio/versions/1.0.7/craftbook.json +324 -0
- package/data/craftbook-templates/tr/transcribe-audio/versions/1.0.7/test.json +197 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.6/craftbook.json +141 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.6/test.json +172 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.7/craftbook.json +143 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.7/test.json +202 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.8/craftbook.json +151 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.8/test.json +206 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.9/craftbook.json +165 -0
- package/data/craftbook-templates/tr/translate-content/versions/1.1.9/test.json +237 -0
- package/data/craftbook-templates/vi/visit-prep/manifest.json +0 -5
- package/data/craftbook-templates/vi/visit-prep/versions/1.0.6/craftbook.json +303 -0
- package/data/craftbook-templates/vi/visit-prep/versions/1.0.6/test.json +134 -0
- package/data/craftbook-templates/vi/visit-prep/versions/1.0.7/craftbook.json +326 -0
- package/data/craftbook-templates/vi/visit-prep/versions/1.0.7/test.json +152 -0
- package/data/craftbook-templates/we/weekly-menu-plan/versions/1.1.0/craftbook.json +309 -0
- package/data/craftbook-templates/we/weekly-menu-plan/versions/1.1.0/test.json +152 -0
- package/data/craftbook-templates/we/weekly-review/versions/1.0.7/craftbook.json +253 -0
- package/data/craftbook-templates/we/weekly-review/versions/1.0.7/test.json +113 -0
- package/data/craftbook-templates/ye/year-in-review/manifest.json +0 -5
- package/data/craftbook-templates/ye/year-in-review/versions/1.0.6/craftbook.json +314 -0
- package/data/craftbook-templates/ye/year-in-review/versions/1.0.6/test.json +140 -0
- package/data/gezel-templates/index.json +1 -1
- package/data/gezel-templates/raw-index.json +1 -1
- package/data/gezel-templates/re/reviewer/versions/1.4.2/about.md +53 -0
- package/data/gezel-templates/re/reviewer/versions/1.4.2/manifest.json +21 -0
- package/data/gezel-templates/re/reviewer/versions/1.4.3/about.md +53 -0
- package/data/gezel-templates/re/reviewer/versions/1.4.3/manifest.json +21 -0
- package/data/image-models/index.json +1 -1
- package/data/image-models/mi/ming-image-0.2-design-q8/manifest.json +39 -0
- package/data/image-models/mi/ming-image-0.2-design-q8/versions/1.0.0/manifest.json +37 -0
- package/data/image-models/raw-index.json +1 -1
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/about.md +7 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/care.json +4 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/manifest.json +233 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/meds.json +8 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/mission.md +7 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/pages/dashboard/application.js +186 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/pages/dashboard/demo-chat.js +224 -0
- package/data/project-types/ca/caregiving-binder/versions/1.2.1/pages/dashboard/index.html +365 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/about.md +7 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/budget.json +5 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/guests.json +10 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/manifest.json +260 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/mission.md +6 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/pages/dashboard/application.js +234 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/pages/dashboard/demo-chat.js +231 -0
- package/data/project-types/ev/event-planner/versions/1.2.0/pages/dashboard/index.html +322 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/about.md +8 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/deck.json +7 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/manifest.json +243 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/mission.md +6 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/pages/review/application.js +147 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/pages/review/demo-chat.js +331 -0
- package/data/project-types/fl/flashcards/versions/1.3.1/pages/review/index.html +665 -0
- package/data/project-types/index.json +1 -1
- package/data/project-types/me/meal-planner/versions/1.2.0/about.md +10 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/manifest.json +259 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/menu.json +5 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/mission.md +5 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/pages/dashboard/application.js +247 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/pages/dashboard/demo-chat.js +134 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/pages/dashboard/index.html +280 -0
- package/data/project-types/me/meal-planner/versions/1.2.0/pantry.json +9 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/about.md +15 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/manifest.json +639 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/mission.md +3 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/pages/quotes/application.js +386 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/pages/quotes/demo-chat.js +263 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/pages/quotes/index.html +998 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/quotes.json +10 -0
- package/data/project-types/qu/quotes-and-bids/versions/1.1.1/rates.json +8 -0
- package/data/project-types/raw-index.json +1 -1
- package/data/project-types/tr/trip-planner/versions/1.1.1/about.md +7 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/journal.json +4 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/manifest.json +297 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/mission.md +4 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/packing.json +8 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/pages/dashboard/application.js +176 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/pages/dashboard/demo-chat.js +264 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/pages/dashboard/index.html +373 -0
- package/data/project-types/tr/trip-planner/versions/1.1.1/trip.json +8 -0
- package/package.json +1 -1
- package/schemas/chat-model-version.schema.json +3 -0
- package/schemas/craftbook-doc.schema.json +21 -0
- package/schemas/craftbook-template-version.schema.json +21 -0
- package/schemas/craftbook-test.schema.json +1261 -183
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
// App-owned composition; platform components come from the Gezel host.
|
|
2
|
+
(function(){
|
|
3
|
+
'use strict';
|
|
4
|
+
var config={
|
|
5
|
+
"title": "At the estimating desk",
|
|
6
|
+
"description": "Start a quote, add the labor and materials, or ask which quotes need a follow-up.",
|
|
7
|
+
"load": "loadQuotes",
|
|
8
|
+
"tabs": [
|
|
9
|
+
{
|
|
10
|
+
"id": "home",
|
|
11
|
+
"label": "Home",
|
|
12
|
+
"sections": [
|
|
13
|
+
".tiles",
|
|
14
|
+
"#follow-section",
|
|
15
|
+
"#results-section"
|
|
16
|
+
],
|
|
17
|
+
"actions": [
|
|
18
|
+
"start_quote",
|
|
19
|
+
"log_quote_follow_up",
|
|
20
|
+
"record_quote_outcome"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "quotes",
|
|
25
|
+
"label": "Quotes",
|
|
26
|
+
"sections": [
|
|
27
|
+
"#builder-section",
|
|
28
|
+
"#quotes-section"
|
|
29
|
+
],
|
|
30
|
+
"actions": [
|
|
31
|
+
"start_quote",
|
|
32
|
+
"add_quote_line",
|
|
33
|
+
"send_quote"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "settings",
|
|
38
|
+
"label": "Settings",
|
|
39
|
+
"settings": [
|
|
40
|
+
"set_quote_terms"
|
|
41
|
+
],
|
|
42
|
+
"sections": [
|
|
43
|
+
"#rates-section"
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"filter": {
|
|
48
|
+
"container": "#quotes-section .table-wrap",
|
|
49
|
+
"selector": "tbody tr",
|
|
50
|
+
"label": "Find a quote",
|
|
51
|
+
"placeholder": "Job or client"
|
|
52
|
+
},
|
|
53
|
+
"placeholder": "What job are we pricing?",
|
|
54
|
+
"actions": [
|
|
55
|
+
{
|
|
56
|
+
"tool": "start_quote",
|
|
57
|
+
"pageTool": "page_start_quote",
|
|
58
|
+
"title": "Start a quote",
|
|
59
|
+
"submitLabel": "Start",
|
|
60
|
+
"fields": [
|
|
61
|
+
{
|
|
62
|
+
"name": "title",
|
|
63
|
+
"label": "Job",
|
|
64
|
+
"required": true,
|
|
65
|
+
"placeholder": "Maple Row panel upgrade"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"name": "client",
|
|
69
|
+
"label": "Client"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "contact",
|
|
73
|
+
"label": "Contact"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "site",
|
|
77
|
+
"label": "Site"
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"tool": "add_quote_line",
|
|
83
|
+
"pageTool": "page_add_quote_line",
|
|
84
|
+
"title": "Add a line item",
|
|
85
|
+
"submitLabel": "Add",
|
|
86
|
+
"fields": [
|
|
87
|
+
{
|
|
88
|
+
"name": "id",
|
|
89
|
+
"label": "Quote",
|
|
90
|
+
"required": true,
|
|
91
|
+
"options": [],
|
|
92
|
+
"records": {
|
|
93
|
+
"path": "quotes.json",
|
|
94
|
+
"list": "records",
|
|
95
|
+
"labelFields": [
|
|
96
|
+
"fields.title",
|
|
97
|
+
"status"
|
|
98
|
+
],
|
|
99
|
+
"where": {
|
|
100
|
+
"field": "status",
|
|
101
|
+
"in": [
|
|
102
|
+
"draft",
|
|
103
|
+
"sent"
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "kind",
|
|
110
|
+
"label": "Kind",
|
|
111
|
+
"required": true,
|
|
112
|
+
"options": [
|
|
113
|
+
"labor",
|
|
114
|
+
"materials",
|
|
115
|
+
"other"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "description",
|
|
120
|
+
"label": "Item",
|
|
121
|
+
"required": true,
|
|
122
|
+
"placeholder": "Electrician labor"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "qty",
|
|
126
|
+
"label": "Quantity",
|
|
127
|
+
"type": "number",
|
|
128
|
+
"required": true,
|
|
129
|
+
"min": 0
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "unit",
|
|
133
|
+
"label": "Unit",
|
|
134
|
+
"placeholder": "hour"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "rate",
|
|
138
|
+
"label": "Rate ($ per unit)",
|
|
139
|
+
"type": "number",
|
|
140
|
+
"required": true
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"tool": "send_quote",
|
|
146
|
+
"pageTool": "page_send_quote",
|
|
147
|
+
"title": "Record a sent quote",
|
|
148
|
+
"submitLabel": "Mark as sent",
|
|
149
|
+
"fields": [
|
|
150
|
+
{
|
|
151
|
+
"name": "id",
|
|
152
|
+
"label": "Quote",
|
|
153
|
+
"required": true,
|
|
154
|
+
"options": [],
|
|
155
|
+
"records": {
|
|
156
|
+
"path": "quotes.json",
|
|
157
|
+
"list": "records",
|
|
158
|
+
"labelFields": [
|
|
159
|
+
"fields.title",
|
|
160
|
+
"status"
|
|
161
|
+
],
|
|
162
|
+
"where": {
|
|
163
|
+
"field": "status",
|
|
164
|
+
"in": [
|
|
165
|
+
"draft"
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"description": "Marks it sent and sets its first follow-up date."
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"tool": "log_quote_follow_up",
|
|
175
|
+
"pageTool": "page_log_quote_follow_up",
|
|
176
|
+
"title": "Log a follow-up",
|
|
177
|
+
"submitLabel": "Log",
|
|
178
|
+
"fields": [
|
|
179
|
+
{
|
|
180
|
+
"name": "id",
|
|
181
|
+
"label": "Quote",
|
|
182
|
+
"required": true,
|
|
183
|
+
"options": [],
|
|
184
|
+
"records": {
|
|
185
|
+
"path": "quotes.json",
|
|
186
|
+
"list": "records",
|
|
187
|
+
"labelFields": [
|
|
188
|
+
"fields.title",
|
|
189
|
+
"status"
|
|
190
|
+
],
|
|
191
|
+
"where": {
|
|
192
|
+
"field": "status",
|
|
193
|
+
"in": [
|
|
194
|
+
"sent"
|
|
195
|
+
]
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "note",
|
|
201
|
+
"label": "What happened",
|
|
202
|
+
"required": true,
|
|
203
|
+
"placeholder": "Left a voicemail with Dana"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "followUpAt",
|
|
207
|
+
"label": "Next follow-up",
|
|
208
|
+
"type": "date"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"tool": "record_quote_outcome",
|
|
214
|
+
"pageTool": "page_record_quote_outcome",
|
|
215
|
+
"title": "Record won or lost",
|
|
216
|
+
"submitLabel": "Record",
|
|
217
|
+
"fields": [
|
|
218
|
+
{
|
|
219
|
+
"name": "id",
|
|
220
|
+
"label": "Quote",
|
|
221
|
+
"required": true,
|
|
222
|
+
"options": [],
|
|
223
|
+
"records": {
|
|
224
|
+
"path": "quotes.json",
|
|
225
|
+
"list": "records",
|
|
226
|
+
"labelFields": [
|
|
227
|
+
"fields.title",
|
|
228
|
+
"status"
|
|
229
|
+
],
|
|
230
|
+
"where": {
|
|
231
|
+
"field": "status",
|
|
232
|
+
"in": [
|
|
233
|
+
"draft",
|
|
234
|
+
"sent"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "outcome",
|
|
241
|
+
"label": "Outcome",
|
|
242
|
+
"required": true,
|
|
243
|
+
"options": [
|
|
244
|
+
"won",
|
|
245
|
+
"lost"
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "note",
|
|
250
|
+
"label": "Why",
|
|
251
|
+
"placeholder": "Went with a lower bid"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"tool": "set_quote_terms",
|
|
257
|
+
"pageTool": "page_set_quote_terms",
|
|
258
|
+
"title": "Tax and terms",
|
|
259
|
+
"fields": [
|
|
260
|
+
{
|
|
261
|
+
"name": "taxRate",
|
|
262
|
+
"label": "Sales tax (%)",
|
|
263
|
+
"type": "number",
|
|
264
|
+
"min": 0
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "taxOn",
|
|
268
|
+
"label": "Tax applies to",
|
|
269
|
+
"options": [
|
|
270
|
+
{
|
|
271
|
+
"value": "materials",
|
|
272
|
+
"label": "Materials only"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"value": "all",
|
|
276
|
+
"label": "The whole quote"
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"name": "validDays",
|
|
282
|
+
"label": "Quotes valid for (days)",
|
|
283
|
+
"type": "number",
|
|
284
|
+
"min": 1
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"name": "followUpDays",
|
|
288
|
+
"label": "Follow up after (days)",
|
|
289
|
+
"type": "number",
|
|
290
|
+
"min": 1
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
"description": "Leave the tax box empty to keep the rate set now, listed under Rates and terms.",
|
|
294
|
+
"current": {
|
|
295
|
+
"path": "rates.json",
|
|
296
|
+
"fields": {
|
|
297
|
+
"taxOn": "taxOn",
|
|
298
|
+
"validDays": "validDays",
|
|
299
|
+
"followUpDays": "followUpDays"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
};
|
|
305
|
+
// Shared app composition v2 (the Gezel app UX guide). On hosts with page components version 2,
|
|
306
|
+
// actions are keys that open dialogs, settings are inline forms, and config.tabs groups the page into
|
|
307
|
+
// Home, noun and Settings tabs. Older hosts keep the expandable forms and an "On this page" list.
|
|
308
|
+
function boot(){
|
|
309
|
+
var api=window.gezel,kit=api&&api.ui.components,main=document.querySelector('main');if(!api||!main)return;
|
|
310
|
+
var handles=[],stops=[],stopped=false,forms=[],revision=0,byTool={};
|
|
311
|
+
// An action's key is its id when two forms share one tool, otherwise its tool.
|
|
312
|
+
function keyOf(action){return action.id||action.tool;}
|
|
313
|
+
(config.actions||[]).forEach(function(action){byTool[keyOf(action)]=action;});
|
|
314
|
+
var problem=document.createElement('p');problem.className='app-problem';problem.hidden=true;problem.setAttribute('role','status');main.prepend(problem);
|
|
315
|
+
function error(e){problem.hidden=false;problem.textContent='Could not refresh this view. '+(e.message||'Try again.');}
|
|
316
|
+
if(!kit||!kit.appLayout){problem.hidden=false;problem.textContent='Update Gezel to use the fullscreen conversation and page controls.';return;}
|
|
317
|
+
var layout=kit.appLayout(main,{title:config.title,description:config.description,chat:config.chat===false?false:{lockRecipient:!config.crew,showAddress:!!config.crew,showThreads:false,placeholder:config.placeholder||'Talk with your companion…',attachments:!!config.attachments,dictation:!!config.dictation}});handles.push(layout);
|
|
318
|
+
var modern=kit.version>=2&&typeof kit.tabs==='function';
|
|
319
|
+
document.documentElement.toggleAttribute('data-app-legacy',!modern);
|
|
320
|
+
function valueAt(object,path){return path.split('.').reduce(function(value,key){return value==null?undefined:value[key];},object);}
|
|
321
|
+
// People read dates, not ISO strings: "2026-11-12" becomes "Thu, Nov 12" in choice labels.
|
|
322
|
+
function shown(value){if(typeof value!=='string'||!/^\d{4}-\d{2}-\d{2}$/.test(value))return value;var date=new Date(value+'T12:00:00');return isFinite(date)?date.toLocaleDateString(undefined,{weekday:'short',month:'short',day:'numeric'}):value;}
|
|
323
|
+
// A choice list may leave out finished records: {field:'status', not:['done']} or {field, in:[...]}.
|
|
324
|
+
function included(record,where){if(!where)return true;var value=valueAt(record,where.field);if(where.in&&where.in.indexOf(value)<0)return false;if(where.not&&where.not.indexOf(value)>=0)return false;return true;}
|
|
325
|
+
function mountForm(mount,action,options){
|
|
326
|
+
var fields=action.fields.map(function(f){return Object.assign({},f);});
|
|
327
|
+
var form={action:action,fields:fields,last:'',inline:!!options&&options.presentation==='inline'};
|
|
328
|
+
form.handle=kit.actionForm(mount,Object.assign({title:action.title,description:action.description,buttonLabel:action.buttonLabel,successMessage:action.successMessage,tool:action.pageTool,fields:fields,mapInput:action.mapInput,submitLabel:action.submitLabel||'Save',onSaved:async function(){window.dispatchEvent(new Event('gezel-app-data-changed'));if(form.inline)setTimeout(function(){void refreshCurrent(form);},0);}},options||{}));
|
|
329
|
+
handles.push(form.handle);forms.push(form);return form;
|
|
330
|
+
}
|
|
331
|
+
function recordPaths(){return Array.from(new Set(forms.flatMap(function(form){return form.fields.filter(function(f){return f.records;}).map(function(f){return f.records.path;});})));}
|
|
332
|
+
async function refreshChoices(){var current=++revision;try{var paths=recordPaths();var docs=await Promise.all(paths.map(function(path){return api.data.read(path);}));if(stopped||revision!==current)return;forms.forEach(function(form){form.fields.forEach(function(field){if(!field.records)return;var spec=field.records,doc=docs[paths.indexOf(spec.path)],records=(valueAt(doc,spec.list)||[]).filter(function(record){return included(record,spec.where);});field.options=records.map(function(record){return {value:record.id,label:spec.labelFields.map(function(path){return shown(valueAt(record,path));}).filter(Boolean).join(' · ')};});});var next=JSON.stringify(form.fields);if(next!==form.last){form.last=next;form.handle.update({fields:form.fields});}});}catch(e){error(e);}}
|
|
333
|
+
// A settings form shows what is saved now: action.current = {path, fields: {formField: 'data.path'}}. A form being edited is left alone.
|
|
334
|
+
// The form just saved refreshes after its save settles (it ignores resets while busy), even though focus is still on its Save key.
|
|
335
|
+
async function refreshCurrent(saved){try{await Promise.all(forms.filter(function(form){return form.inline&&form.action.current&&form.handle.reset&&(!saved||form===saved);}).map(async function(form){var spec=form.action.current,doc=await api.data.read(spec.path);if(stopped||form!==saved&&form.handle.element.matches(':focus-within'))return;var values={};Object.keys(spec.fields).forEach(function(name){var value=valueAt(doc,spec.fields[name]);if(value!==undefined&&value!==null)values[name]=value;});form.handle.reset(values);}));}catch(e){error(e);}}
|
|
336
|
+
function headerEnd(){var heading=main.querySelector('h1'),sub=heading&&heading.nextElementSibling&&heading.nextElementSibling.tagName==='P'?heading.nextElementSibling:null;return config.headerEnd?main.querySelector(config.headerEnd):sub||heading;}
|
|
337
|
+
function insertAfterHeader(node){var anchor=headerEnd();if(anchor)anchor.after(node);else main.prepend(node);}
|
|
338
|
+
// Keys for the given tools, the first (or the named one) drawn as the view's one primary.
|
|
339
|
+
function actionBar(tools,primary){var row=document.createElement('div');row.className='app-actionbar';tools=(tools||[]).filter(function(tool){return byTool[tool];});if(primary===undefined)primary=tools[0];tools.forEach(function(tool){var mount=document.createElement('div');row.append(mount);mountForm(mount,byTool[tool],{presentation:'dialog',primary:tool===primary});});row.hidden=!tools.length;return row;}
|
|
340
|
+
if(!modern)buildLegacy();else if(config.tabs)buildTabs();else insertAfterHeader(actionBar(config.bar||(config.actions||[]).filter(function(action){return !action.rowOnly;}).map(keyOf),config.primary));
|
|
341
|
+
if(modern)buildRowDialogs();
|
|
342
|
+
void refreshChoices();void refreshCurrent();
|
|
343
|
+
// Pages announce their own edits; a demo's watches fire only for the sample conversation, so listen as well.
|
|
344
|
+
function dataChanged(){void refreshChoices();void refreshCurrent();}
|
|
345
|
+
window.addEventListener('gezel-app-data-changed',dataChanged);stops.push(function(){window.removeEventListener('gezel-app-data-changed',dataChanged);});
|
|
346
|
+
recordPaths().forEach(function(path){stops.push(api.data.watch(path,refreshChoices));});
|
|
347
|
+
Array.from(new Set(forms.filter(function(form){return form.inline&&form.action.current;}).map(function(form){return form.action.current.path;}))).forEach(function(path){stops.push(api.data.watch(path,function(){void refreshCurrent();}));});
|
|
348
|
+
// config.filter: {container, selector, label, placeholder?, minItems?}, or the older [container, selector, label].
|
|
349
|
+
var filter=Array.isArray(config.filter)?{container:config.filter[0],selector:config.filter[1],label:config.filter[2]}:config.filter;
|
|
350
|
+
if(filter&&kit.collectionFilter){var container=document.querySelector(filter.container);if(container){var search=document.createElement('div');search.className='app-search';container.before(search);handles.push(kit.collectionFilter(search,{container:container,selector:filter.selector,label:filter.label,placeholder:filter.placeholder,minItems:filter.minItems===undefined?8:filter.minItems}));}}
|
|
351
|
+
function buildTabs(){
|
|
352
|
+
var bar=document.createElement('div'),last=bar,specs=[];bar.className='app-tabs';insertAfterHeader(bar);
|
|
353
|
+
config.tabs.forEach(function(tab){
|
|
354
|
+
var panel=document.createElement('div');panel.className='app-panel';panel.id='app-panel-'+tab.id;last.after(panel);last=panel;
|
|
355
|
+
if((tab.actions||[]).length)panel.append(actionBar(tab.actions,tab.primary));
|
|
356
|
+
var settings=(tab.settings||[]).filter(function(tool){return byTool[tool];});
|
|
357
|
+
if(settings.length){var box=document.createElement('div');box.className='app-settings';panel.append(box);settings.forEach(function(tool){var mount=document.createElement('div');box.append(mount);mountForm(mount,byTool[tool],{presentation:'inline',clearOnSave:false,submitLabel:byTool[tool].submitLabel||'Save changes'});});}
|
|
358
|
+
(tab.sections||[]).forEach(function(selector){main.querySelectorAll(selector).forEach(function(node){if(!node.closest('.app-panel'))panel.append(node);});});
|
|
359
|
+
specs.push({id:tab.id,label:tab.label,panel:panel,count:tab.badge});
|
|
360
|
+
});
|
|
361
|
+
var tabs=kit.tabs(bar,{label:config.tabsLabel||'App sections',tabs:specs.map(function(spec){return {id:spec.id,label:spec.label,panel:spec.panel};})});handles.push(tabs);
|
|
362
|
+
// A tab's badge mirrors a count the page already shows (tab.badge is that element's selector), so the two never disagree.
|
|
363
|
+
var shown='';
|
|
364
|
+
function badges(){var next=specs.map(function(spec){var node=spec.count?document.querySelector(spec.count):null,text=node?node.textContent.trim():'';return {id:spec.id,label:spec.label,panel:spec.panel,badge:/^[1-9][0-9]*$/.test(text)?text:''};}),key=next.map(function(tab){return tab.badge;}).join('|');if(key!==shown){shown=key;tabs.update({tabs:next});}}
|
|
365
|
+
if(specs.some(function(spec){return spec.count;})){var observer=new MutationObserver(badges);observer.observe(main,{subtree:true,childList:true,characterData:true});stops.push(function(){observer.disconnect();});badges();}
|
|
366
|
+
window.appTabs={select:function(id){tabs.select(id);}};
|
|
367
|
+
}
|
|
368
|
+
// Any action can open from a record: <button data-app-action="tool" data-app-values='{"id":"…"}'>. These dialogs sit
|
|
369
|
+
// outside the tab panels, so a hidden tab never hides one.
|
|
370
|
+
function buildRowDialogs(){
|
|
371
|
+
var box=document.createElement('div'),openers={};box.className='app-dialogs';main.append(box);
|
|
372
|
+
(config.actions||[]).forEach(function(action){var mount=document.createElement('div');box.append(mount);openers[keyOf(action)]=mountForm(mount,action,{presentation:'dialog',trigger:false});});
|
|
373
|
+
main.addEventListener('click',function(event){var target=event.target.closest&&event.target.closest('[data-app-action]');var form=target&&openers[target.getAttribute('data-app-action')];if(!form)return;event.preventDefault();var values={};try{values=JSON.parse(target.getAttribute('data-app-values')||'{}');}catch(_){}form.handle.open(values);});
|
|
374
|
+
}
|
|
375
|
+
function buildLegacy(){
|
|
376
|
+
var actions=document.createElement('div');actions.className='app-actions';actions.hidden=!(config.actions||[]).length;
|
|
377
|
+
var anchor=main.querySelector('h1');if(anchor){var after=anchor.nextElementSibling;after?after.after(actions):anchor.after(actions);}else main.prepend(actions);
|
|
378
|
+
(config.actions||[]).forEach(function(action){var mount=document.createElement('div');actions.append(mount);mountForm(mount,action);});
|
|
379
|
+
var skip='dialog,[role=dialog]'+(config.navExclude?','+config.navExclude:'');
|
|
380
|
+
var headings=Array.from(main.querySelectorAll('h2')).filter(function(h){return h.textContent.trim()&&!h.closest(skip);});
|
|
381
|
+
if(headings.length>1&&headings.length<10){var nav=document.createElement('nav');nav.className='app-section-nav';nav.setAttribute('aria-label','On this page');headings.forEach(function(h,index){if(!h.id)h.id='app-section-'+index;var id=h.id,label=Array.from(h.childNodes).filter(function(n){return n.nodeType===3;}).map(function(n){return n.data;}).join('').trim()||h.textContent.trim(),link=document.createElement('a');link.href='#'+id;link.textContent=label;link.onclick=function(event){var target=document.getElementById(id);if(target){event.preventDefault();target.scrollIntoView({block:'start'});}};nav.append(link);});actions.before(nav);}
|
|
382
|
+
}
|
|
383
|
+
window.addEventListener('pagehide',function(){stopped=true;revision++;stops.forEach(function(stop){stop();});handles.reverse().forEach(function(handle){handle.destroy();});},{once:true});
|
|
384
|
+
}
|
|
385
|
+
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',boot,{once:true});else boot();
|
|
386
|
+
})();
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
// The standalone demo's sample conversation. In Gezel, the estimator's
|
|
2
|
+
// replies come from the model the person chooses; here they are scripted,
|
|
3
|
+
// and every change goes through the same tools the crew calls, so every
|
|
4
|
+
// amount and total comes from the quote store's own arithmetic.
|
|
5
|
+
window.demoChat = (function () {
|
|
6
|
+
'use strict';
|
|
7
|
+
var DAY = 86400000;
|
|
8
|
+
var WEEKDAYS = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
|
|
9
|
+
|
|
10
|
+
function pad(n) { return n < 10 ? '0' + n : String(n); }
|
|
11
|
+
function iso(ms) { var d = new Date(ms); return d.getFullYear() + '-' + pad(d.getMonth() + 1) + '-' + pad(d.getDate()); }
|
|
12
|
+
function daysLeft(day) { return Math.round((Date.parse(String(day).slice(0, 10) + 'T00:00:00') - Date.parse(iso(Date.now()) + 'T00:00:00')) / DAY); }
|
|
13
|
+
function when(days) { return days < 0 ? -days + (days === -1 ? ' day late' : ' days late') : days === 0 ? 'today' : days === 1 ? 'tomorrow' : 'in ' + days + ' days'; }
|
|
14
|
+
function niceDate(day) { return new Date(String(day).slice(0, 10) + 'T12:00:00').toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' }); }
|
|
15
|
+
function money(cents) {
|
|
16
|
+
var n = Math.round(Number(cents) || 0), abs = Math.abs(n);
|
|
17
|
+
return (n < 0 ? '-$' : '$') + String(Math.floor(abs / 100)).replace(/\B(?=(\d{3})+(?!\d))/g, ',') + '.' + pad(abs % 100);
|
|
18
|
+
}
|
|
19
|
+
function fold(text) { return String(text || '').normalize('NFD').replace(/[̀-ͯ]/g, '').toLowerCase(); }
|
|
20
|
+
function cap(text) { return text.charAt(0).toUpperCase() + text.slice(1); }
|
|
21
|
+
function isOpen(r) { return r.status === 'draft' || r.status === 'sent'; }
|
|
22
|
+
function total(r) { return Number(r.fields.totalCents) || 0; }
|
|
23
|
+
function unitText(qty, unit) { return qty + ' ' + (qty === 1 || unit === 'each' || unit === 'lot' ? unit : unit === 'foot' ? 'feet' : unit + 's'); }
|
|
24
|
+
function lineText(l) { return l.description + ', ' + unitText(l.qty, l.unit) + ' × ' + money(l.rateCents) + ' = ' + money(l.amountCents); }
|
|
25
|
+
function taxText(r) { var bp = Number(r.fields.taxBp) || 0; return bp ? (bp / 100).toFixed(2).replace(/\.?0+$/, '') + '% on ' + (r.fields.taxOn === 'all' ? 'the whole quote' : 'materials') : 'no tax set'; }
|
|
26
|
+
|
|
27
|
+
function state(ctx) {
|
|
28
|
+
return Promise.all([ctx.read('quotes.json'), ctx.read('rates.json')]).then(function (v) {
|
|
29
|
+
return { records: (v[0] && v[0].records) || [], rates: (v[1] && v[1].rates) || [] };
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
// The quote the person means: the one whose title and client share the most words with what they wrote.
|
|
33
|
+
function find(s, text, onlyOpen) {
|
|
34
|
+
var words = fold(text).match(/[a-z]{4,}/g) || [];
|
|
35
|
+
var best = null, score = 0;
|
|
36
|
+
s.records.forEach(function (r) {
|
|
37
|
+
if (onlyOpen && !isOpen(r)) return;
|
|
38
|
+
var name = fold(r.fields.title + ' ' + (r.fields.client || ''));
|
|
39
|
+
var hits = words.filter(function (w) { return name.indexOf(w) >= 0 || name.indexOf(w.replace(/s$/, '')) >= 0; }).length;
|
|
40
|
+
if (hits > score) { best = r; score = hits; }
|
|
41
|
+
});
|
|
42
|
+
return best;
|
|
43
|
+
}
|
|
44
|
+
function savedRate(s, text) {
|
|
45
|
+
var t = fold(text);
|
|
46
|
+
return s.rates.filter(function (r) { var n = fold(r.name); return t.indexOf(n) >= 0 || n.indexOf(t.trim()) >= 0 && t.trim().length > 3; })[0] || null;
|
|
47
|
+
}
|
|
48
|
+
function dollars(text) { var m = text.match(/\$\s?([\d,]+(?:\.\d{1,2})?)/); return m ? Number(m[1].replace(/,/g, '')) : null; }
|
|
49
|
+
function dateIn(text) {
|
|
50
|
+
var lower = text.toLowerCase(), m = lower.match(/\b(sunday|monday|tuesday|wednesday|thursday|friday|saturday)\b/);
|
|
51
|
+
if (m) { var d = new Date(); d.setHours(12, 0, 0, 0); d.setDate(d.getDate() + (((WEEKDAYS.indexOf(m[1]) - d.getDay() + 7) % 7) || 7)); return iso(d.getTime()); }
|
|
52
|
+
if (/\btomorrow\b/.test(lower)) return iso(Date.now() + DAY);
|
|
53
|
+
if (/\bnext week\b/.test(lower)) return iso(Date.now() + 7 * DAY);
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
// One spoken item ('10 hours electrician', '200A panel $1,850', 'permit $185') as a quote line.
|
|
57
|
+
function item(s, words) {
|
|
58
|
+
var hours = words.match(/^(\d+(?:\.\d+)?)\s*(?:hours?|hrs?)\s+(?:of\s+)?(.+)$/i);
|
|
59
|
+
if (hours) {
|
|
60
|
+
var who = hours[2].replace(/\s+(?:labor|time|work)$/i, '').trim(), rate = savedRate(s, who);
|
|
61
|
+
var labor = { description: cap(rate ? rate.name : who) + ' labor', kind: 'labor', qty: Number(hours[1]), unit: 'hour' };
|
|
62
|
+
if (rate) labor.rateName = rate.name;
|
|
63
|
+
return labor;
|
|
64
|
+
}
|
|
65
|
+
var price = dollars(words);
|
|
66
|
+
var count = words.match(/^(\d+)\s*x?\s+/i);
|
|
67
|
+
var name = words.replace(/\$\s?[\d,]+(?:\.\d{1,2})?/, '').replace(/^(\d+)\s*x?\s+/i, '').replace(/\s+(?:at|for|@)\s*$/i, '').trim();
|
|
68
|
+
var saved = savedRate(s, name);
|
|
69
|
+
var line = { description: cap(saved ? saved.name : name), kind: saved ? saved.kind : /permit|fee|inspection|haul|disposal|dumpster/i.test(name) ? 'other' : 'materials', qty: count ? Number(count[1]) : 1, unit: saved ? saved.unit : 'each' };
|
|
70
|
+
if (price !== null) line.rate = price;
|
|
71
|
+
else if (saved) line.rateName = saved.name;
|
|
72
|
+
else return null;
|
|
73
|
+
return line;
|
|
74
|
+
}
|
|
75
|
+
function totalsReply(r) {
|
|
76
|
+
var f = r.fields;
|
|
77
|
+
return 'Subtotal ' + money(f.subtotalCents) + ', tax ' + money(f.taxCents) + ' (' + taxText(r) + '), **total ' + money(f.totalCents) + '**.';
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function followUps(ctx) {
|
|
81
|
+
return ctx.invoke('quotes_status', {}, 'Quotes and follow-ups').then(function () { return state(ctx); }).then(function (s) {
|
|
82
|
+
var due = s.records.filter(function (r) { return r.status === 'sent' && r.fields.followUpAt && daysLeft(r.fields.followUpAt) <= 7; })
|
|
83
|
+
.sort(function (a, b) { return String(a.fields.followUpAt).localeCompare(String(b.fields.followUpAt)); });
|
|
84
|
+
var drafts = s.records.filter(function (r) { return r.status === 'draft'; });
|
|
85
|
+
if (!due.length) return 'Nothing needs a follow-up this week.' + (drafts.length ? ' ' + drafts.map(function (r) { return r.fields.title; }).join(' and ') + ' is still a draft.' : '');
|
|
86
|
+
return 'These need a call, the late one first:\n' + due.map(function (r) {
|
|
87
|
+
var notes = (r.history || []).filter(function (h) { return h.note && !/^Sent to the client/.test(h.note); });
|
|
88
|
+
return '- **' + r.fields.title + '**, ' + when(daysLeft(r.fields.followUpAt)) + ' (' + money(total(r)) + (r.fields.contact ? ', ' + r.fields.contact : '') + ', sent ' + when(daysLeft(r.fields.sentAt)).replace('late', 'ago') + ')' +
|
|
89
|
+
(notes.length ? '. Last note: ' + notes[notes.length - 1].note.replace(/\.$/, '') + '.' : '');
|
|
90
|
+
}).join('\n') + (drafts.length ? '\n\n' + drafts.map(function (r) { return r.fields.title; }).join(' and ') + (drafts.length === 1 ? ' is' : ' are') + ' still a draft, not sent.' : '');
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function addHours(ctx, text) {
|
|
95
|
+
return state(ctx).then(function (s) {
|
|
96
|
+
var r = find(s, text, true);
|
|
97
|
+
if (!r) return 'Which quote should that go on? Name the job, like “the Juniper Press quote”.';
|
|
98
|
+
var qty = Number((text.match(/(\d+(?:\.\d+)?)/) || [])[1]);
|
|
99
|
+
var what = (text.match(/\d+(?:\.\d+)?\s+(?:more\s+|extra\s+)?(.+?)\s+(?:to|on)\s+the\b/i) || [])[1] || '';
|
|
100
|
+
if (!qty || !what) return 'Tell me the amount and the item, like “add 6 more electrician hours to the Juniper Press quote”.';
|
|
101
|
+
var hours = /\bhours?\b|\bhrs?\b/i.test(what), who = what.replace(/\b(?:hours?|hrs?|of)\b/gi, '').trim();
|
|
102
|
+
var rate = savedRate(s, who);
|
|
103
|
+
var existing = (r.fields.lines || []).filter(function (l) { return fold(l.description).indexOf(fold(rate ? rate.name : who)) >= 0; })[0];
|
|
104
|
+
var input = { id: r.id };
|
|
105
|
+
if (existing) { input.description = existing.description; input.addQty = qty; }
|
|
106
|
+
else if (hours && rate) { input.description = rate.name + ' labor'; input.rateName = rate.name; input.qty = qty; input.kind = 'labor'; input.unit = 'hour'; }
|
|
107
|
+
else return 'What does ' + who + ' cost per unit? Give me a price, like “' + who + ' at $40 each”.';
|
|
108
|
+
var before = total(r);
|
|
109
|
+
return ctx.invoke('add_quote_line', input, (existing ? existing.description + ' + ' : input.description + ' × ') + qty).then(function () { return state(ctx); }).then(function (after) {
|
|
110
|
+
var now = after.records.find(function (x) { return x.id === r.id; });
|
|
111
|
+
var l = now.fields.lines.find(function (x) { return fold(x.description) === fold(input.description); });
|
|
112
|
+
return (existing
|
|
113
|
+
? 'Added ' + unitText(qty, l.unit) + ' to ' + l.description + ' on **' + now.fields.title + '**: now ' + unitText(l.qty, l.unit) + ' × ' + money(l.rateCents) + ' = ' + money(l.amountCents)
|
|
114
|
+
: 'Added a line to **' + now.fields.title + '**: ' + lineText(l)) + '.\n\n' +
|
|
115
|
+
totalsReply(now) + ' That’s ' + money(total(now) - before) + ' more than before' + (l.kind === 'labor' && now.fields.taxOn !== 'all' ? ', with no change to the tax, since tax applies to materials only' : '') + '.';
|
|
116
|
+
});
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
function sendIt(ctx, text) {
|
|
121
|
+
return state(ctx).then(function (s) {
|
|
122
|
+
var r = find(s, text, true);
|
|
123
|
+
if (!r) return 'Which quote went out? Name the job, like “send the Juniper Press quote”.';
|
|
124
|
+
return ctx.invoke('send_quote', { id: r.id }, r.fields.title + ': sent').then(function () { return state(ctx); }).then(function (after) {
|
|
125
|
+
var now = after.records.find(function (x) { return x.id === r.id; });
|
|
126
|
+
return 'Marked **' + now.fields.title + '** sent: ' + money(total(now)) + ', valid until ' + niceDate(now.fields.validUntil) + '. ' +
|
|
127
|
+
'The first follow-up is ' + niceDate(now.fields.followUpAt) + ', and Gezel will remind you that morning. ' +
|
|
128
|
+
'In Gezel, with DocBlocks installed, I can also turn it into a PDF for you to attach.';
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function decided(ctx, text) {
|
|
134
|
+
return state(ctx).then(function (s) {
|
|
135
|
+
var r = find(s, text, true);
|
|
136
|
+
if (!r) return 'Which quote was that? Name the job, like “we won the café kitchen rewire”.';
|
|
137
|
+
var lost = /\b(lost|went with|chose|said no|turned us down|passed)\b/i.test(text);
|
|
138
|
+
var reason = lost ? ((text.match(/\b((?:went with|because|chose) .+)$/i) || [])[1] || '') : '';
|
|
139
|
+
var input = { id: r.id, outcome: lost ? 'lost' : 'won' };
|
|
140
|
+
if (reason) input.note = cap(reason.replace(/[.\s]+$/, ''));
|
|
141
|
+
return ctx.invoke('record_quote_outcome', input, r.fields.title + ': ' + input.outcome).then(function () { return state(ctx); }).then(function (after) {
|
|
142
|
+
var won = after.records.filter(function (x) { return x.status === 'won'; }).length;
|
|
143
|
+
var decidedCount = after.records.filter(function (x) { return x.status === 'won' || x.status === 'lost'; }).length;
|
|
144
|
+
var rate = 'That makes ' + won + ' won of ' + decidedCount + ' decided (' + Math.round((won / decidedCount) * 100) + '%).';
|
|
145
|
+
return lost
|
|
146
|
+
? 'Recorded **' + r.fields.title + '** as lost' + (input.note ? ': ' + input.note.toLowerCase() : '') + '. ' + rate + ' If price was the reason, it may be worth comparing your labor hours on the next bid like it.'
|
|
147
|
+
: 'Congratulations: **' + r.fields.title + '** is won, ' + money(total(r)) + '. ' + rate + ' When the work is done, the Invoice Generator plan can turn these same lines into an invoice.';
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
function priceJob(ctx, text) {
|
|
153
|
+
var m = text.match(/\b(?:price|quote)\s+(?:a|an|the)\s+(.+?)\s+for\s+(.+?):\s*(.+)$/i);
|
|
154
|
+
if (!m) return Promise.resolve('Give me the job, the client and the items, like “price a panel upgrade for Maple Row: 200A panel $1,850, 10 hours electrician, permit $185”.');
|
|
155
|
+
var job = m[1].trim(), client = m[2].trim(), title = client + ' ' + job;
|
|
156
|
+
return state(ctx).then(function (s) {
|
|
157
|
+
var lines = m[3].split(/,\s+|\s+and\s+/).map(function (w) { return item(s, w.trim()); });
|
|
158
|
+
if (lines.some(function (l) { return !l; })) return 'I need a price for each item, like “200A panel $1,850”, or hours for a saved rate, like “10 hours electrician”.';
|
|
159
|
+
var chain = ctx.invoke('start_quote', { title: title, client: client }, title);
|
|
160
|
+
var id = null;
|
|
161
|
+
chain = chain.then(function () { return state(ctx); }).then(function (after) { id = after.records.find(function (x) { return fold(x.fields.title) === fold(title); }).id; });
|
|
162
|
+
lines.forEach(function (l) {
|
|
163
|
+
chain = chain.then(function () { return ctx.invoke('add_quote_line', Object.assign({ id: id }, l), l.description + (l.qty !== 1 ? ' × ' + l.qty : '')); });
|
|
164
|
+
});
|
|
165
|
+
return chain.then(function () { return state(ctx); }).then(function (after) {
|
|
166
|
+
var r = after.records.find(function (x) { return x.id === id; });
|
|
167
|
+
return 'Started **' + r.fields.title + '** and priced it:\n' + r.fields.lines.map(function (l) { return '- ' + lineText(l); }).join('\n') + '\n\n' +
|
|
168
|
+
totalsReply(r) + ' It’s a draft; tell me what to change, or say “send it” when it’s ready.';
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function logFollow(ctx, text) {
|
|
174
|
+
return state(ctx).then(function (s) {
|
|
175
|
+
var r = find({ records: s.records.filter(function (x) { return x.status === 'sent'; }) }, text);
|
|
176
|
+
if (!r) return 'Which sent quote was that about? Name the client, like “left a voicemail with Mei at Fernwood”.';
|
|
177
|
+
var next = dateIn(text), input = { id: r.id, note: cap(text.replace(/\s+/g, ' ').trim().replace(/[.\s]+$/, '')) + '.' };
|
|
178
|
+
if (next) input.followUpAt = next;
|
|
179
|
+
return ctx.invoke('log_quote_follow_up', input, r.fields.title + ': follow-up').then(function () { return state(ctx); }).then(function (after) {
|
|
180
|
+
var now = after.records.find(function (x) { return x.id === r.id; });
|
|
181
|
+
return 'Logged it on **' + now.fields.title + '**. Next follow-up: ' + niceDate(now.fields.followUpAt) + '.';
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function showTotal(ctx, text) {
|
|
187
|
+
return state(ctx).then(function (s) {
|
|
188
|
+
var r = find(s, text);
|
|
189
|
+
if (!r) return 'Which quote? Name the job or the client.';
|
|
190
|
+
return ctx.invoke('show_quote', { id: r.id }, r.fields.title).then(function () {
|
|
191
|
+
return '**' + r.fields.title + '** (' + r.status + '):\n' + r.fields.lines.map(function (l) { return '- ' + lineText(l); }).join('\n') + '\n\n' + totalsReply(r);
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function saveRate(ctx, text) {
|
|
197
|
+
var m = text.match(/\b(?:our\s+)?([a-z][a-z ]+?)\s+rate\s+(?:is|to)\s+(?:now\s+)?\$\s?([\d,]+(?:\.\d{1,2})?)/i);
|
|
198
|
+
if (!m) return Promise.resolve('Tell me the rate and the price, like “our electrician rate is now $98 an hour”.');
|
|
199
|
+
var name = cap(m[1].trim()), price = Number(m[2].replace(/,/g, ''));
|
|
200
|
+
return ctx.invoke('save_rate', { name: name, kind: 'labor', unit: 'hour', rate: price }, name + ' ' + money(price * 100) + '/hour').then(function () {
|
|
201
|
+
return 'Saved: ' + name + ' at ' + money(price * 100) + ' an hour. Lines already on quotes keep the price they were given; new ' + name.toLowerCase() + ' lines use this one.';
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function setTax(ctx, text) {
|
|
206
|
+
var pct = Number((text.match(/(\d+(?:\.\d+)?)\s*%/) || [])[1]);
|
|
207
|
+
var on = /\b(everything|whole|all|labor too|total)\b/i.test(text) ? 'all' : 'materials';
|
|
208
|
+
return ctx.invoke('set_quote_terms', { taxRate: pct, taxOn: on }, 'Sales tax ' + pct + '%').then(function () {
|
|
209
|
+
return 'Sales tax is now ' + pct + '% on ' + (on === 'all' ? 'the whole quote' : 'materials') + '. Draft quotes are re-totaled; quotes already sent keep the tax they went out with. ' +
|
|
210
|
+
'Which work is taxable is worth confirming with your accountant or the state revenue department.';
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function winRate(ctx) {
|
|
215
|
+
return ctx.invoke('quotes_status', {}, 'Win and loss record').then(function () { return state(ctx); }).then(function (s) {
|
|
216
|
+
var won = s.records.filter(function (r) { return r.status === 'won'; }), lost = s.records.filter(function (r) { return r.status === 'lost'; });
|
|
217
|
+
var sum = function (list) { return list.reduce(function (t, r) { return t + total(r); }, 0); };
|
|
218
|
+
if (!won.length && !lost.length) return 'Nothing is decided yet.';
|
|
219
|
+
return 'You’ve won ' + won.length + ' of ' + (won.length + lost.length) + ' decided quotes (' + Math.round((won.length / (won.length + lost.length)) * 100) + '%), ' + money(sum(won)) + ' of ' + money(sum(won) + sum(lost)) + ' by value.' +
|
|
220
|
+
(lost.length ? ' Lost: ' + lost.map(function (r) { return r.fields.title + (r.fields.reason ? ' (' + r.fields.reason.toLowerCase() + ')' : ''); }).join(', ') + '.' : '');
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
return {
|
|
225
|
+
name: 'Teun',
|
|
226
|
+
role: 'Estimator',
|
|
227
|
+
greeting: 'Hello, I’m Teun. I price Brightline Electric’s jobs and keep the quotes moving. Fernwood’s follow-up is 2 days late, the café quote is due a call today, and Juniper Press is still a draft.',
|
|
228
|
+
suggestions: [
|
|
229
|
+
'Which quotes need a follow-up?',
|
|
230
|
+
'Add 6 more electrician hours to the Juniper Press quote',
|
|
231
|
+
'Send the Juniper Press quote',
|
|
232
|
+
'We won the café kitchen rewire',
|
|
233
|
+
'Price a panel upgrade for Maple Row: 200A panel $1,850, 10 hours electrician, permit $185',
|
|
234
|
+
],
|
|
235
|
+
respond: function (text, ctx) {
|
|
236
|
+
var lower = text.toLowerCase();
|
|
237
|
+
if (/\b(?:price|quote)\s+(?:a|an|the)\b.*\bfor\b.*:/.test(lower)) return priceJob(ctx, text);
|
|
238
|
+
if (/\b(we won|won the|signed|we lost|lost the|went with|turned us down)\b/.test(lower)) return decided(ctx, text);
|
|
239
|
+
if (/\bwin rate\b|\bhow many\b.*\b(won|lost)\b/.test(lower)) return winRate(ctx);
|
|
240
|
+
if (/\btax\b/.test(lower) && /\d\s*%/.test(lower)) return setTax(ctx, text);
|
|
241
|
+
if (/\brate\b/.test(lower) && /\$\s?\d/.test(lower)) return saveRate(ctx, text);
|
|
242
|
+
if (/\b(add|more|another|extra)\b/.test(lower) && /\d/.test(lower)) return addHours(ctx, text);
|
|
243
|
+
if (/\b(send|mark sent|sent it|mail)\b/.test(lower)) return sendIt(ctx, text);
|
|
244
|
+
if (/\b(followed up|called|voicemail|emailed|spoke|talked)\b/.test(lower)) return logFollow(ctx, text);
|
|
245
|
+
if (/\b(follow|chase|need a call|waiting)\b/.test(lower)) return followUps(ctx);
|
|
246
|
+
if (/\b(total|how much|price|cost|show)\b/.test(lower)) return showTotal(ctx, text);
|
|
247
|
+
return null;
|
|
248
|
+
},
|
|
249
|
+
reactions: {
|
|
250
|
+
page_record_quote_outcome: function (input, output) {
|
|
251
|
+
return output && output.summary
|
|
252
|
+
? output.summary.split('. ')[0] + '. ' + (input.outcome === 'won' ? 'When the work is done, I can turn it into an invoice.' : 'The reason goes on the record for the next bid.')
|
|
253
|
+
: 'Recorded.';
|
|
254
|
+
},
|
|
255
|
+
page_add_quote_line: function (input, output) {
|
|
256
|
+
return output && output.total ? 'Added. The quote now totals ' + money(Math.round(output.total * 100)) + ', tax included.' : 'Added.';
|
|
257
|
+
},
|
|
258
|
+
page_send_quote: function (input, output) {
|
|
259
|
+
return output && output.summary ? output.summary.split('. ').slice(0, 2).join('. ') + '. I’ll keep the follow-up on the list.' : 'Marked sent.';
|
|
260
|
+
},
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
})();
|