Giter Site home page Giter Site logo

heldnodig-site's People

Contributors

ferrydeboer avatar janvankampen avatar larsdenbakker avatar milovanderlinden avatar xvilo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

heldnodig-site's Issues

Superheroes

I saw @janvankampen posting the below in slack. Just opened the issue here to continue a possible conversion if/how we should develop this.

Initally this list can simple be somehting manual. But I guess it makes sense to think about an easier form of maintenance. Initially this function is maybe nothing more than a flag and a phone number on a hero so that we can list these superheros?

Slack message:

Onze uitdaging nu is om de hulpvragen te vinden. Een deel van de doelgroep is nog niet bekend met ons. Een is offline. Ik doe zelf m’n best vragen naar ons toe te trekken, want aanbod van hulp in overvloed. Dat werkt, want ineens zijn er veel hulpvragen.
Het idee is om kar-trekkers (‘superhelden’) te hebben per plaats/gemeente. Het liefst ook met telefoonnummer, zodat ouderen deze partijen kunnen bereiken. Alle verzoeken die ze niet ad-hoc kunnen fixen, kunnen ze doorzetten bij ons. In Beverwijk is dit ‘Stichting Welzijn’ geworden, die al in contact staat met heel veel ouderen en kwetsbare mensen. Ook de voedselbank doet onze flyers in alle pakketten.
Hoe gaan we de zogenaamde superhelden vinden? De Ambassadeurs. Deze organisaties/mensen zet ik ook graag op de website met telefoonnummer.

zipToCity function is missing

HeldNodig has two call to what is supposed to be an instance method on itself; zipToCity. This function however is nowhere to be fond in the code. 🤔@janvankampen I guess you're the only one who can dig this up somewhere.

This break making a help request:

test-php-fpm | NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to undefined method HeldNodig::zipToCity() in /application/classes/HeldNodig.php:58
test-php-fpm | Stack trace:
test-php-fpm | #0 /application/requestForm.php(62): HeldNodig->createRequest()
test-php-fpm | #1 {main}
test-php-fpm | thrown in /application/classes/HeldNodig.php on line 58
test-php-fpm | 172.19.0.2 - 20/Mar/2020:12:50:10 +0000 "POST /requestForm.php" 500

How to generate entities?

It seems entities are generated from the JSON file, with what tool is this done? Can we add some documentation about this?

Captcha not working on development

I was having issues with the captcha not validating. I was already in the process of fixing this by making the sitekey and secret configurable.

Test/mock data

Om de website lokaal te draaien en te testen zou het handig zijn om de database standaard met mock/test data te vullen.

Show/filter help requests (using a map)

In order to quickly see/find if I can help in my region
as a (potential) hero
I want to see and filter the help requests on a map

Description

The amount of open help requests is now still limited. Not only is it helpful to see / filter the (open) requests on a map for potential hero's. It will also aid us in increasing awareness of the existence of the website in places were there seemingly are gaps while the infection grade is already high in this areas.

Common elements should be embeds

Common elements/components should be twig embeds.
This will allow us to more easily make changes in them, and let the change propagate everywhere.

It would also solve some duplicate code

Sign up as hero fails, fix all bind_param by value calls

When siging up as hero I get the folloing error output:

test-php-fpm | 172.19.0.2 - 20/Mar/2020:12:52:11 +0000 "GET /index.php" 200
test-php-fpm | 172.19.0.2 - 20/Mar/2020:12:52:13 +0000 "GET /heroForm.php" 200
test-php-fpm | NOTICE: PHP message: PHP Fatal error: Uncaught Error: Cannot pass parameter 3 by reference in /application/classes/HeldNodig.php:88
test-php-fpm | Stack trace:
test-php-fpm | #0 /application/heroForm.php(34): HeldNodig->createHero()
test-php-fpm | #1 {main}
test-php-fpm | thrown in /application/classes/HeldNodig.php on line 88
test-php-fpm | 172.19.0.2 - 20/Mar/2020:12:52:20 +0000 "POST /heroForm.php" 500

Custom Css & Js

I would like to start adding some custom CSS and maybe in time some JS.

What is my plan

  • Add a small build system that does
    • postcss
    • critical css and non-critical css
    • typescript
  • Get rid of bootstrap, as it adds a lot of unneeded functionality

I want to keep everything as light as possible for the final distributable's

Repeat (copy) help request

In order to repeat a request I posted before
As a help requester
I want to be able to repeat my request.

Fix PHP notices and warnings.

I get the following notices about deprecated constructs when making a request. This is probably not an issue for php 7.3 on the server.

test-php-fpm | NOTICE: PHP message: PHP Notice: Undefined index: CreateNew in /application/classes/generated/Category.php on line 14
test-php-fpm | NOTICE: PHP message: PHP Notice: Undefined index: CreateNew in /application/classes/generated/Category.php on line 14
test-php-fpm | NOTICE: PHP message: PHP Notice: Undefined property: Category::$Twig in /application/classes/generated/Category.php on line 104
test-php-fpm | NOTICE: PHP message: PHP Notice: Only variables should be passed by reference in /application/classes/generated/Category.php on line 30
test-php-fpm | NOTICE: PHP message: PHP Warning: Use of undefined constant Id - assumed 'Id' (this will throw an Error in a future version of PHP) in /application/classes/generated/Category.php on line 36
test-php-fpm | NOTICE: PHP message: PHP Warning: Use of undefined constant Name - assumed 'Name' (this will throw an Error in a future version of PHP) in /application/classes/generated/Category.php on line 38
test-php-fpm | NOTICE: PHP message: PHP Notice: Undefined property: Category::$Twig in /application/classes/generated/Category.php on line 104
test-php-fpm | NOTICE: PHP message: PHP Notice: Only variables should be passed by reference in /application/classes/generated/Category.php on line 30
test-php-fpm | NOTICE: PHP message: PHP Warning: Use of undefined constant Id - assumed 'Id' (this will throw an Error in a future version of PHP) in /application/classes/generated/Category.php on line 36
test-php-fpm | NOTICE: PHP message: PHP Warning: Use of undefined constant Name - assumed 'Name' (this will throw an Error in a future version of PHP) in /application/classes/generated/Category.php on line 38

Show/filter heros (using a map)

In order to see where hero's are needed and possibly raise awareness
as a marketeer
I want to see the locations and amount of heros in places.

Description

besides having a map/list of help requests it helps also seeing the hero's in the same regions.

The generate code is invalid and throws warnings

Some example warnings:

[20-Mar-2020 22:18:05 Europe/Amsterdam] PHP Warning:  Use of undefined constant Id - assumed 'Id' (this will throw an Error in a future version of PHP) in /heldnodig-site/classes/generated/Category.php on line 36
[20-Mar-2020 22:18:05 Europe/Amsterdam] PHP Warning:  Use of undefined constant Name - assumed 'Name' (this will throw an Error in a future version of PHP) in /heldnodig-site/classes/generated/Category.php on line 38

Example code:

        while ($row = $result->fetch_assoc()) {
            $this->Id = $row['Id'];
            $this->Twig[Id]=$row['Id'];
            $this->Name = $row['Name'];
            $this->Twig[Name]=$row['Name'];
        }

which should be

        while ($row = $result->fetch_assoc()) {
            $this->Id = $row['Id'];
            $this->Twig['Id']=$row['Id'];
            $this->Name = $row['Name'];
            $this->Twig['Name']=$row['Name'];
        }

Use a framework instead?

What

Currently, the setup is all custom. While this works for a few pages, it could be hard maintaining its code and security wise. If we want people to help out it's best to have a common ground so people are set up quickly.

I would suggest porting this to Symfony 4.3 (which is LTS), it would give us the following advantages:

  • Common framework a lot of developers know
  • Twig/PHP
  • Doctrine for Database, so we don't have to deal with the 'generated' models. (not sure how they are generated even).

It's probably a good idea to not think too long about this, as the codebase and database are still small, so migrating would take too much effort.

How

I would suggest creating another branch (named Symfony in which we can collaborate, and create issues tagged with a Symfony tag so we can easily see who does what.

We can then create small PR's into the Symfony branch, while we can still support current code by merging directly into master.

As we think everything is ready for an MVP, we can then merge Symfony into master without too much effort.

Other things?

I'm eager to know what your opinions are, and I, definitely, did not want to push things through. Just opening a discussion here, and let's see what comes out.

Convert zipcode to city

Due to time pressure, I've never implemented a feature to convert zipcodes to a city. The city field already exists in the data structure on Request and Hero (LocationCity), but I fill it manually on review.

I want to use a free service, or a static list to convert and fill it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.