Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieval methods for data repository #174

Closed
dvayanu opened this issue Jul 1, 2024 · 2 comments
Closed

Retrieval methods for data repository #174

dvayanu opened this issue Jul 1, 2024 · 2 comments
Assignees

Comments

@dvayanu
Copy link
Member

dvayanu commented Jul 1, 2024

Provide methods to retrieve information required for data repository presentation.

Image

@dvayanu dvayanu self-assigned this Jul 1, 2024
dvayanu added a commit that referenced this issue Jul 2, 2024
@dvayanu
Copy link
Member Author

dvayanu commented Jul 2, 2024

Example response:

{
    "success": true,
    "message": null,
    "results": {
        "data": [
            {
                "name": "orderCountPercentOngoal",
                "value": "0.175",
                "formulas": [
                    "div orderCountPercentOngoal total.orderCount,constantOrderGoal"
                ]
            },
            {
                "name": "maxOrdersShop",
                "value": "Hamburg",
                "formulas": [
                    "ifequals maxOrdersShop hamburg.orderCount,maxOrders,Hamburg",
                    "ifequals maxOrdersShop montreal.orderCount,maxOrders,Montreal",
                    "ifequals maxOrdersShop munich.orderCount,maxOrders,Munich"
                ]
            },
            {
                "name": "orderCount.arrow",
                "value": null,
                "formulas": [
                    "ifglz orderCount.arrow orderdeviation,arrow-up,arrow-down,circle"
                ]
            },
            {
                "name": "hundred",
                "value": "100",
                "formulas": [
                    "const hundred 100"
                ]
            },
            {
                "name": "payment.count.change",
                "value": null,
                "formulas": [
                    "sum payment.count.change payment.count.deviation",
                    "addstring payment.count.change %"
                ]
            },
            {
                "name": "constantRevenueGoal",
                "value": "10000",
                "formulas": [
                    "const constantRevenueGoal 10000"
                ]
            },
            {
                "name": "earningsPercentOngoal",
                "value": "0.9396766666666667",
                "formulas": [
                    "div earningsPercentOngoal total.earnings,constantEarningsGoal"
                ]
            },
            {
                "name": "total.earnings",
                "value": "16914 €",
                "formulas": [
                    "sum total.earnings hamburg.earnings,munich.earnings,montreal.earnings",
                    "div total.earnings total.earnings,hundred",
                    "currency total.earnings total.earnings",
                    "int total.earnings total.earnings",
                    "addstring total.earnings €"
                ]
            },
            {
                "name": "payment.count.arrow",
                "value": null,
                "formulas": [
                    "ifglz payment.count.arrow payment.count.deviation,arrow-up,arrow-down,circle"
                ]
            },
            {
                "name": "maxOrders",
                "value": "7",
                "formulas": [
                    "max maxOrders hamburg.orderCount,munich.orderCount,montreal.orderCount",
                    "int maxOrders maxOrders"
                ]
            },
            {
                "name": "reg.male.deviation",
                "value": null,
                "formulas": [
                    "deviationPercent reg.male.deviation reg.male.today,reg.male.sameYesterday"
                ]
            },
            {
                "name": "constantOrderGoal",
                "value": "40",
                "formulas": [
                    "const constantOrderGoal 40"
                ]
            },
            {
                "name": "orderCount.change",
                "value": null,
                "formulas": [
                    "sum orderCount.change orderdeviation",
                    "addstring orderCount.change %"
                ]
            },
            {
                "name": "payment.revenue.deviation",
                "value": null,
                "formulas": [
                    "deviationPercent payment.revenue.deviation payments.revenue.today,payments.revenue.sameYesterday"
                ]
            },
            {
                "name": "reg.total.arrow",
                "value": null,
                "formulas": [
                    "ifglz reg.total.arrow reg.total.deviation,arrow-up,arrow-down,circle"
                ]
            },
            {
                "name": "payment.count.deviation",
                "value": null,
                "formulas": [
                    "deviationPercent payment.count.deviation payments.count.today,payments.count.sameYesterday"
                ]
            },
            {
                "name": "reg.male.arrow",
                "value": null,
                "formulas": [
                    "ifglz reg.male.arrow reg.male.deviation,arrow-up,arrow-down,circle"
                ]
            },
            {
                "name": "paymentsrevenuetodayongoal",
                "value": null,
                "formulas": [
                    "div paymentsrevenuetodayongoal payments.revenue.today,constantRevenueGoal"
                ]
            },
            {
                "name": "total.requests",
                "value": "579",
                "formulas": [
                    "sum total.requests hamburg.requests,munich.requests,montreal.requests",
                    "int total.requests total.requests"
                ]
            },
            {
                "name": "constantEarningsGoal",
                "value": "18000",
                "formulas": [
                    "const constantEarningsGoal 18000"
                ]
            },
            {
                "name": "reg2order",
                "value": "100.0 %",
                "formulas": [
                    "div reg2order payments.count.today,reg.male.today",
                    "mul reg2order reg2order,hundred,hundred",
                    "int reg2order reg2order",
                    "div reg2order reg2order,hundred",
                    "addstring reg2order %"
                ]
            },
            {
                "name": "reg.total.deviation",
                "value": null,
                "formulas": [
                    "deviationPercent reg.total.deviation reg.total.today,reg.total.sameYesterday"
                ]
            },
            {
                "name": "reg.total.change",
                "value": null,
                "formulas": [
                    "sum reg.total.change reg.total.deviation",
                    "addstring reg.total.change %"
                ]
            },
            {
                "name": "payment.revenue.change",
                "value": null,
                "formulas": [
                    "sum payment.revenue.change payment.revenue.deviation",
                    "addstring payment.revenue.change %"
                ]
            },
            {
                "name": "payment.revenue.arrow",
                "value": null,
                "formulas": [
                    "ifglz payment.revenue.arrow payment.revenue.deviation,arrow-up,arrow-down,circle"
                ]
            },
            {
                "name": "reg.male.change",
                "value": null,
                "formulas": [
                    "sum reg.male.change reg.male.deviation",
                    "addstring reg.male.change %"
                ]
            },
            {
                "name": "orderdeviation",
                "value": null,
                "formulas": [
                    "deviationPercent orderdeviation total.orderCount,previous.total.orderCount"
                ]
            },
            {
                "name": "payments.revenue.today",
                "value": null,
                "formulas": [
                    "int payments.revenue.today payments.revenue.today",
                    "addstring payments.revenue.today €"
                ]
            },
            {
                "name": "total.orderCount",
                "value": "7",
                "formulas": [
                    "sum total.orderCount hamburg.orderCount,munich.orderCount,montreal.orderCount",
                    "int total.orderCount total.orderCount"
                ]
            },
            {
                "name": "total.sessions",
                "value": "523",
                "formulas": [
                    "sum total.sessions hamburg.sessions,munich.sessions,montreal.sessions",
                    "int total.sessions total.sessions"
                ]
            }
        ]
    }
}

@dvayanu dvayanu closed this as completed Jul 2, 2024
@dvayanu
Copy link
Member Author

dvayanu commented Jul 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant