forked from trent_larson/crowd-funder-for-time-pwa
docs: add call graph and chain documentation to remaining methods
Add comprehensive JSDoc documentation to methods in HomeView.vue: - latLongInAnySearchBox: Add call chain from shouldIncludeRecord - giveDescription: Document template usage and displayAmount calls - displayAmount: Add currency formatting chain - currencyShortWordForCode: Document amount formatting flow - openDialog: Document template and openGiftedPrompts usage - openGiftedPrompts: Add dialog opening chain - showNameThenIdDialog: Document template usage and prompt flow - promptForShareMethod: Add sharing flow documentation Each method now includes: - @callGraph showing caller/callee relationships - @chain showing complete execution paths - @requires listing dependencies - Enhanced parameter documentation This completes the standardized documentation pattern across all methods, making method relationships and dependencies explicit.
This commit is contained in:
@@ -783,7 +783,16 @@ export default class HomeView extends Vue {
|
|||||||
* Checks if coordinates fall within any search box
|
* Checks if coordinates fall within any search box
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
* Called by shouldIncludeRecord() for location-based filtering
|
* @callGraph
|
||||||
|
* Called by: shouldIncludeRecord()
|
||||||
|
* Calls: None
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* shouldIncludeRecord() -> latLongInAnySearchBox()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - this.searchBoxes
|
||||||
|
*
|
||||||
* @param lat Latitude to check
|
* @param lat Latitude to check
|
||||||
* @param long Longitude to check
|
* @param long Longitude to check
|
||||||
* @returns true if coordinates are within any search box
|
* @returns true if coordinates are within any search box
|
||||||
@@ -1230,7 +1239,20 @@ export default class HomeView extends Vue {
|
|||||||
* Formats gift description with giver and recipient info
|
* Formats gift description with giver and recipient info
|
||||||
*
|
*
|
||||||
* @public
|
* @public
|
||||||
* Used in template for displaying gift descriptions
|
* @callGraph
|
||||||
|
* Called by: Template
|
||||||
|
* Calls: displayAmount()
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* Template -> giveDescription() -> displayAmount() -> currencyShortWordForCode()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - giveRecord.fullClaim
|
||||||
|
* - giveRecord.giver
|
||||||
|
* - giveRecord.receiver
|
||||||
|
* - giveRecord.recipientProjectName
|
||||||
|
* - giveRecord.providerPlanName
|
||||||
|
*
|
||||||
* @param giveRecord Record containing gift information
|
* @param giveRecord Record containing gift information
|
||||||
* @returns formatted description string
|
* @returns formatted description string
|
||||||
*/
|
*/
|
||||||
@@ -1342,7 +1364,20 @@ export default class HomeView extends Vue {
|
|||||||
* Formats amount with currency code
|
* Formats amount with currency code
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
* Called by giveDescription()
|
* @callGraph
|
||||||
|
* Called by: giveDescription()
|
||||||
|
* Calls: currencyShortWordForCode()
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* giveDescription() -> displayAmount() -> currencyShortWordForCode()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - code: string (currency code)
|
||||||
|
* - amt: number (amount to format)
|
||||||
|
*
|
||||||
|
* @param code Currency code
|
||||||
|
* @param amt Amount to format
|
||||||
|
* @returns formatted amount string
|
||||||
*/
|
*/
|
||||||
displayAmount(code: string, amt: number) {
|
displayAmount(code: string, amt: number) {
|
||||||
return "" + amt + " " + this.currencyShortWordForCode(code, amt === 1);
|
return "" + amt + " " + this.currencyShortWordForCode(code, amt === 1);
|
||||||
@@ -1352,7 +1387,20 @@ export default class HomeView extends Vue {
|
|||||||
* Gets currency word based on code and plurality
|
* Gets currency word based on code and plurality
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
* Called by displayAmount()
|
* @callGraph
|
||||||
|
* Called by: displayAmount()
|
||||||
|
* Calls: None
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* giveDescription() -> displayAmount() -> currencyShortWordForCode()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - unitCode: string (currency code)
|
||||||
|
* - single: boolean (whether to use singular form)
|
||||||
|
*
|
||||||
|
* @param unitCode Currency code
|
||||||
|
* @param single Whether to use singular form
|
||||||
|
* @returns formatted currency word
|
||||||
*/
|
*/
|
||||||
currencyShortWordForCode(unitCode: string, single: boolean) {
|
currencyShortWordForCode(unitCode: string, single: boolean) {
|
||||||
return unitCode === "HUR" ? (single ? "hour" : "hours") : unitCode;
|
return unitCode === "HUR" ? (single ? "hour" : "hours") : unitCode;
|
||||||
@@ -1362,7 +1410,20 @@ export default class HomeView extends Vue {
|
|||||||
* Opens dialog for creating new gift/claim
|
* Opens dialog for creating new gift/claim
|
||||||
*
|
*
|
||||||
* @public
|
* @public
|
||||||
* Called by template and openGiftedPrompts()
|
* @callGraph
|
||||||
|
* Called by:
|
||||||
|
* - Template
|
||||||
|
* - openGiftedPrompts()
|
||||||
|
* Calls: GiftedDialog.open()
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* Template -> openDialog()
|
||||||
|
* openGiftedPrompts() -> openDialog()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - this.$refs.customDialog
|
||||||
|
* - this.activeDid
|
||||||
|
*
|
||||||
* @param giver Optional contact info for giver
|
* @param giver Optional contact info for giver
|
||||||
* @param description Optional gift description
|
* @param description Optional gift description
|
||||||
*/
|
*/
|
||||||
@@ -1383,7 +1444,17 @@ export default class HomeView extends Vue {
|
|||||||
* Opens prompts for gift ideas
|
* Opens prompts for gift ideas
|
||||||
*
|
*
|
||||||
* @public
|
* @public
|
||||||
* Called by template click handler
|
* @callGraph
|
||||||
|
* Called by: Template
|
||||||
|
* Calls: openDialog()
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* Template -> openGiftedPrompts() -> openDialog()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - this.$refs.giftedPrompts
|
||||||
|
*
|
||||||
|
* @param callback Function to handle selected gift info
|
||||||
*/
|
*/
|
||||||
openGiftedPrompts() {
|
openGiftedPrompts() {
|
||||||
(this.$refs.giftedPrompts as GiftedPrompts).open((giver, description) =>
|
(this.$refs.giftedPrompts as GiftedPrompts).open((giver, description) =>
|
||||||
@@ -1436,7 +1507,18 @@ export default class HomeView extends Vue {
|
|||||||
* Shows name input dialog if needed
|
* Shows name input dialog if needed
|
||||||
*
|
*
|
||||||
* @public
|
* @public
|
||||||
* Called by template click handler
|
* @callGraph
|
||||||
|
* Called by: Template
|
||||||
|
* Calls:
|
||||||
|
* - UserNameDialog.open()
|
||||||
|
* - promptForShareMethod()
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* Template -> showNameThenIdDialog() -> promptForShareMethod()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - this.$refs.userNameDialog
|
||||||
|
* - this.givenName
|
||||||
*/
|
*/
|
||||||
showNameThenIdDialog() {
|
showNameThenIdDialog() {
|
||||||
if (!this.givenName) {
|
if (!this.givenName) {
|
||||||
@@ -1452,7 +1534,16 @@ export default class HomeView extends Vue {
|
|||||||
* Shows dialog for sharing method selection
|
* Shows dialog for sharing method selection
|
||||||
*
|
*
|
||||||
* @internal
|
* @internal
|
||||||
* Called by showNameThenIdDialog()
|
* @callGraph
|
||||||
|
* Called by: showNameThenIdDialog()
|
||||||
|
* Calls: ChoiceButtonDialog.open()
|
||||||
|
*
|
||||||
|
* @chain
|
||||||
|
* Template -> showNameThenIdDialog() -> promptForShareMethod()
|
||||||
|
*
|
||||||
|
* @requires
|
||||||
|
* - this.$refs.choiceButtonDialog
|
||||||
|
* - this.$router
|
||||||
*/
|
*/
|
||||||
promptForShareMethod() {
|
promptForShareMethod() {
|
||||||
(this.$refs.choiceButtonDialog as ChoiceButtonDialog).open({
|
(this.$refs.choiceButtonDialog as ChoiceButtonDialog).open({
|
||||||
|
|||||||
Reference in New Issue
Block a user