Skip to content

Commit

Permalink
Generate solution + sample.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Katerina-Chernevskaya committed Nov 19, 2024
1 parent dfcbc00 commit 69af787
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 95 deletions.
169 changes: 74 additions & 95 deletions samples/gym-management-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The Gym Management App is designed to enhance efficiency and reduce costs for gy
![Dataverse](https://img.shields.io/badge/Dataverse-No-red "No")
![AI Builder](https://img.shields.io/badge/AI%20Builder-No-red "No")
![Custom Connectors](https://img.shields.io/badge/Custom%20Connectors-No-red "No")
![Power Fx](https://img.shields.io/badge/Power%20Fx-No-red "No")
![Power Fx](https://img.shields.io/badge/Power%20Fx-Yes-green "Yes")

## Compatibility

Expand All @@ -25,69 +25,23 @@ The Gym Management App is designed to enhance efficiency and reduce costs for gy

## Contributors

- [Marvelous Omotoso](https://github.com/Marvelous-O)
* [Marvelous Omotoso](https://github.com/Marvelous-O)

## Version history

| Version | Date | Comments |
| ------- | ---------------- | --------------- |
| 1.0 | October 27, 2024 | Initial release |
|Version|Date|Comments|
|-------|------|---------------|
|1.0|October 27, 2024|Initial release|

## Features

This template not only gives you a good foundation for customizing your own Membership Registration system, it also demonstrates patterns that you can use across other apps.

### Key Features of the solution include:

- A dashboard landing page featuring Registered Memebers and Subscription Due Date which was calculated by the app in respect to the Memeber's Subcription Package . Ability to search for a member's details either by Name or E-mail, without having to search through a long list of Excel Spreadsheet.
![Prompt Admin Products](assets/LandingPage.PNG)

**Automated Member Registration**: New members' information is directly entered into the app, eliminating manual data entry.
![Prompt Admin Products](assets/NewReg1.PNG)
![Prompt Admin Products](assets/NewReg2.PNG)

**Subscription Management**: The app automatically calculates the subscription due date based on the plan selected during registration.
![Prompt Admin Products](assets/EditScreen.PNG)

**Automated Communication**:

- Sends a welcome message immediately after registration.
![Prompt Admin Products](assets/EmailScreenshot.PNG)

- Sends a reminder email 7 days before the subscription is due.
- Sends another reminder email 3 days before the subscription is due.
![Prompt Admin Products](assets/RenewalEmail.PNG)

* The Ability to edit already registered member if he or she changes contacts.
![Prompt Admin Products](assets/EditScreen.PNG)

## Data Sources

- Sharepoint List
## Prerequisites

## Automated Flow

![Prompt Admin Products](assets/CopyDueDate.PNG)

**Automated Welcome Message**

![Prompt Admin Products](assets/FlowForWelcomeMessage.png)

**Automated Subscription Renewal**

![Prompt Admin Products](assets/SubscriptionRenewalFlow.png)

**Due Date Flow:** (How I used a calculated column for Filter Query in Power Automate)

![Prompt Admin Products](assets/DueDateFlow.png)

Calculated columns can't be used for filter queries in Power Automate. Here's what I did: I created another flow to always copy the data from the calculated column (which is the calculated due date) to another column named DueDate2 as soon as a new member is registered. This new column became a regular date column, making it non-calculated. The Subscription Reminder Flow filters the DueDate2 column to check which members' subscriptions are almost due.

## Minimal path to awesome
- Make sure Office 365 Outlook is enabled in your environment for E-mail sending
- The Sharepoint list must be the Datasource, the app uses Sharepoint as the Datasource.

### STEP 1: Creating the Data Source
### Creating the Data Source

- Create a SharePoint List with the following columns:

| Column Name | Column Type |
| ------------------ | ------------------------------------------------------------------------------------ |
| Date | Date and Time |
Expand All @@ -99,9 +53,10 @@ Calculated columns can't be used for filter queries in Power Automate. Here's wh
|DueDate | Calculated Column (Check how to create this below) |
|Gender | Choice (Male, Female) |
|DueDate2 | Date and Time |

**NOTE:** Make sure your column names are exactly the way it is written above.

## How to Create Due Date Calculated Column
### How to Create Due Date Calculated Column

Step 1: Add a Column
![Prompt Admin Products](assets/DueDateStep1.png)
Expand All @@ -118,75 +73,99 @@ Calculated columns can't be used for filter queries in Power Automate. Here's wh

![Prompt Admin Products](assets/DueDateStep4.png)

Step 5: Scroll down to formula and paste in this formula: =IF([MembershipPlan]="Daily",[Date]+1,IF([MembershipPlan]="Weekly",[Date]+7,IF([MembershipPlan]="Monthly",[Date]+30,IF([MembershipPlan]="Quarterly(3 Months)",[Date]+90,IF([MembershipPlan]="Half a year(6 Months)",[Date]+180,IF([MembershipPlan]="Yearly(12 Months)",[Date]+365)))))) and scroll down to select Date and Time where it says 'The data type returned from this formula is: ' and change the Date and Time Format to Date Only
Step 5: Scroll down to formula and paste in this formula:

```
=IF([MembershipPlan]="Daily",[Date]+1,IF([MembershipPlan]="Weekly",[Date]+7,IF([MembershipPlan]="Monthly",[Date]+30,IF([MembershipPlan]="Quarterly(3 Months)",[Date]+90,IF([MembershipPlan]="Half a year(6 Months)",[Date]+180,IF([MembershipPlan]="Yearly(12 Months)",[Date]+365))))))
```

Scroll down to select Date and Time where it says `The data type returned from this formula is: ` and change the Date and Time Format to **Date Only**

![Prompt Admin Products](assets/DueDateStep5.png)

### STEP 2: Importing the Solution
## Minimal path to awesome

[Download](./solution/gym-management-app.zip) the `.zip` from the `solution` folder
Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
When importing the solution you will be prompted to connect a SharePoint site and Office 365 Outlook, kindly connect your SharePoint Site and Office365 Outlook. Use the SharePoint list you created in step 1 as the data source.
### Using the solution zip

## Requirements
* [Download](./solution/gym-management-app.zip) the `.zip` from the `solution` folder.
* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
* When importing the solution you will be prompted to connect a SharePoint site and Office 365 Outlook, kindly connect your SharePoint Site and Office365 Outlook. Use the SharePoint list you created in step 1 as the data source.

- Make sure Office 365 Outlook is enabled in your environment for E-mail sending
- The Sharepoint list created in step 1 must be the Datasource, the app uses Sharepoint as the Datasource.
<!--
PRO TIP:
### Using the source code

For commands, use the `code syntax`
You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps:

For button labels, page names, dialog names, etc. as they appear on the screen, use **Bold**
* Clone the repository to a local drive
* Pack the source files back into a solution `.zip` file:

Don't use "click", use "select" or "use"
```bash
pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
```

As tempting as it may be, don't just use images to describe the steps. Let's be as inclusive as possible and think about accessibility.
Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)

-->
* Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.

### Using the solution zip
## Features

- [Download](./solution/gym-management-app.zip) the `.zip` from the `solution` folder
- Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
- Open the app in edit mode and make sure the data source **Data source name** is connected correctly.
This template not only gives you a good foundation for customizing your own Membership Registration system, it also demonstrates patterns that you can use across other apps.

### Using the source code
### Key Features of the solution include:

You can also use the [Power Apps CLI](https://docs.microsoft.com/powerapps/developer/data-platform/powerapps-cli) to pack the source code by following these steps:
A dashboard landing page featuring Registered Memebers and Subscription Due Date which was calculated by the app in respect to the Memeber's Subcription Package . Ability to search for a member's details either by Name or E-mail, without having to search through a long list of Excel Spreadsheet.
![Prompt Admin Products](assets/LandingPage.PNG)

- Clone the repository to a local drive
- Pack the source files back into a solution `.zip` file:
**Automated Member Registration**: New members' information is directly entered into the app, eliminating manual data entry.
![Prompt Admin Products](assets/NewReg1.PNG)
![Prompt Admin Products](assets/NewReg2.PNG)

```bash
pac solution pack --zipfile pathtodestinationfile --folder pathtosourcefolder --processCanvasApps
```
**Subscription Management**: The app automatically calculates the subscription due date based on the plan selected during registration.
![Prompt Admin Products](assets/EditScreen.PNG)

Making sure to replace `pathtosourcefolder` to point to the path to this sample's `sourcecode` folder, and `pathtodestinationfile` to point to the path of this solution's `.zip` file (located under the `solution` folder)
**Automated Communication**:

- Within **Power Apps Studio**, import the solution `.zip` file using **Solutions** > **Import Solution** and select the `.zip` file you just packed.
<!--
RESERVED FOR REPO MAINTAINERS
- Sends a welcome message immediately after registration.
![Prompt Admin Products](assets/EmailScreenshot.PNG)

We'll add the video from the community call recording here
- Sends a reminder email 7 days before the subscription is due.
- Sends another reminder email 3 days before the subscription is due.
![Prompt Admin Products](assets/RenewalEmail.PNG)

## Video
* The Ability to edit already registered member if he or she changes contacts.
![Prompt Admin Products](assets/EditScreen.PNG)

### Data Sources

- Sharepoint List

### Automated Flow

[![YouTube video title](./assets/video-thumbnail.jpg)](https://www.youtube.com/watch?v=XXXXX "YouTube video title")
-->
**Automated Welcome Message**

![Prompt Admin Products](assets/FlowForWelcomeMessage.png)

**Automated Subscription Renewal**

![Prompt Admin Products](assets/SubscriptionRenewalFlow.png)

**Due Date Flow:** (How I used a calculated column for Filter Query in Power Automate)

![Prompt Admin Products](assets/DueDateFlow.png)

Calculated columns can't be used for filter queries in Power Automate. Here's what I did: I created another flow to always copy the data from the calculated column (which is the calculated due date) to another column named DueDate2 as soon as a new member is registered. This new column became a regular date column, making it non-calculated. The Subscription Reminder Flow filters the DueDate2 column to check which members' subscriptions are almost due.

## Help

We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=Gym-Membership-Registration&authors=@Marvelous-O&title=Gym-Membership-Registration%20-%20).
If you encounter any issues while using this sample, you can [create a new issue](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=bug-report.yml&sample=gym-management-app&authors=@Marvelous-O&title=gym-management-app%20-%20).

For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=Gym-Membership-Registration&authors=@Marvelous-O&title=Gym-Membership-Registration%20-%20).
For questions regarding this sample, [create a new question](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=question.yml&sample=gym-management-app&authors=@Marvelous-O&title=gym-management-app%20-%20).

Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=YGym-Membership-Registration&authors=@Marvelous-O&title=Gym-Membership-Registration%20-%20).
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/powerapps-samples/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected&template=suggestion.yml&sample=gym-management-app&authors=@Marvelous-O&title=gym-management-app%20-%20).

## Disclaimer

**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/Gym-Membership-Registration" aria-hidden="true" />
<img src="https://m365-visitor-stats.azurewebsites.net/powerplatform-samples/samples/gym-management-app" aria-hidden="true" />
68 changes: 68 additions & 0 deletions samples/gym-management-app/assets/sample.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[
{
"name": "pnp-powerplatform-samples-gym-management-app",
"source": "pnp",
"title": "Gym Management App",
"shortDescription": "The Gym Management App is designed to enhance efficiency and reduce costs for gym owners.",
"url": "https://github.com/pnp/powerplatform-samples/tree/main/samples/gym-management-app",
"downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/powerplatform-samples/tree/main/samples/gym-management-app",
"longDescription": [
"The Gym Management App is designed to enhance efficiency and reduce costs for gym owners."
],
"creationDateTime": "2024-10-27",
"updateDateTime": "2024-10-27",
"products": [
"Power Apps",
"Power Automate",
"Power Fx",
"Power Platform"
],
"tags": [
"management app"
],
"categories": [
"CANVAS",
"CLOUD-FLOW"
],
"metadata": [
{
"key": "POWERAPPS-EXPERIMENTAL",
"value": "No"
},
{
"key": "POWERAPPS-PREMIUM",
"value": "No"
},
{
"key": "POWERAPPS-ONPREM",
"value": "No"
},
{
"key": "POWERAPPS-CUSTOMCONNECTOR",
"value": "No"
}
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/powerplatform-samples/raw/main/samples/gym-management-app/assets/LandingPage.PNG",
"alt": "App preview"
}
],
"authors": [
{
"gitHubAccount": "Marvelous-O",
"pictureUrl": "https://github.com/Marvelous-O.png",
"name": "Marvelous Omotoso"
}
],
"references": [
{
"name": "Microsoft Power Platform documentation",
"description": "Discover how to make the most of Microsoft Power Platform products with online training courses, docs, and videos covering product capabilities and how-to guides.",
"url": "https://learn.microsoft.com/power-platform/"
}
]
}
]
Binary file modified samples/gym-management-app/solution/gym-management-app.zip
Binary file not shown.

0 comments on commit 69af787

Please sign in to comment.