1. Përshëndetje dhe mirësevini në forumin e Itshqip.com
    Nëse akoma nuk jeni pjesë e IT komunitetit më të madhë Shqiptarë nga fusha e Teknologjisë Informative, ju ftojmë që të bëheni pjesë e këtij komuniteti që tani duke u regjistruar këtu - procedura është shumë e thjeshtë dhe e lehtë. Gjithashtu ju mund të regjistroheni edhe përmes rrjetit social Facebook, Twitter, Google+.

Nidhm per nje punim ne Javascript

Tema tek 'Programim' e hapur nga doli`, 19 Gusht 2021.

  1. doli`

    doli` Anëtar Aktiv

    Postimet:
    133
    Pëlqimet:
    4
    Pikë nga trofetë:
    18
    Pershendetje te gjithve, me duhet nje punim ne javascript. Nese dikush ka njohuri te mira ia kisha dit per nder me ma punu kete detyr. (me duhet me dorzu me 20gusht) Falemenderit.

    Punimi:
    Create a filter for reviews. The reviews can be sorted by (ordered by priority):
    ● Text - Prioritize by text : [ Yes | No ]
    ● Rating - [ Highest First | Lowest First ]
    ● Date - [ Newest First | Oldest First ]

    and filtered by: ● Minimum rating - [ 5, 4, 3, 2, 1 ]

    Here is an example of how the form should look like (styling is not important):

    [​IMG]

    [​IMG]

    The reviews should be filtered and sorted according to all settings.

    Prioritize by text means that the reviews with review text should be shown first, with all other filters and sorts taken into account.

    For example:

    Order by Rating = Highest First
    Order by Date = Oldest First
    Prioritize by text = Yes

    Minimum rating = 3 You need to sort the reviews according to the sort priority: Text, Rating and Date.

    In this example, get all reviews with Review Text, then sort them by Rating (5, 4, 3) and then sort those by Date.

    Don’t show reviews that are filtered, in this example only show those with a rating equal to or higher than 3.

    Here is the correct order:

    5 star reviews with text - oldest first,
    4 star reviews with text - oldest first,
    3 star reviews with text - oldest first,
    5 star reviews without text - oldest first,
    4 star reviews without text - oldest first
    3 star reviews without text - oldest first,

    Show the filtered and sorted reviews in a simple table, or just show the JSON.

    You can find the reviews in the reviews.json file.
    *Partial solutions of the project are accepted as well, so share any progress you make.
    *A git repository with full commit history is expected to be part of the delivered solution
    *If needed, provide additional installation instructions, but there shouldn't be much more than running a simple command to set everything up.



    JSON:
    Code:
    [
      {
        "id": 2097047,
        "reviewId": "93f131be27dc1122bb7ef0048ad10e4f",
        "reviewFullText": "5 star review",
        "reviewText": "5 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 5,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T13:00:35+00:00",
        "reviewCreatedOnTime": 1611579635,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #20",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097046,
        "reviewId": "6e7bd4c71a56885ef583bd79186af689",
        "reviewFullText": "4 star review",
        "reviewText": "4 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 4,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T13:00:21+00:00",
        "reviewCreatedOnTime": 1611579621,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #19",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097045,
        "reviewId": "ced8bd056d0adec93c651f935c7dde80",
        "reviewFullText": "3 star review",
        "reviewText": "3 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 3,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T13:00:10+00:00",
        "reviewCreatedOnTime": 1611579610,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #18",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097044,
        "reviewId": "b0dfee9017fafe7d751f0fea1f3ce540",
        "reviewFullText": "2 star review",
        "reviewText": "2 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 2,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:59:57+00:00",
        "reviewCreatedOnTime": 1611579597,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #17",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097043,
        "reviewId": "10588b914a39967f3a702b02f3751794",
        "reviewFullText": "1 star review",
        "reviewText": "1 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 1,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:59:40+00:00",
        "reviewCreatedOnTime": 1611579580,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #16",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097042,
        "reviewId": "1d14901bbb67ded3368d2d8d8b5989d8",
        "reviewFullText": "5 star review",
        "reviewText": "5 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 5,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:59:27+00:00",
        "reviewCreatedOnTime": 1611579567,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #15",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097041,
        "reviewId": "ca10718af15af32f71da09a6e5f78c48",
        "reviewFullText": "",
        "reviewText": "",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 4,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:59:15+00:00",
        "reviewCreatedOnTime": 1611579555,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #14",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097040,
        "reviewId": "65b3ba7d67109d2a4f573fca44d5e532",
        "reviewFullText": "3 star review",
        "reviewText": "3 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 3,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:58:46+00:00",
        "reviewCreatedOnTime": 1611579526,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #13",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097039,
        "reviewId": "c111f4f05a1048e3a43a28e5bfd0be27",
        "reviewFullText": "",
        "reviewText": "",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 2,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:58:22+00:00",
        "reviewCreatedOnTime": 1611579502,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #12",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097038,
        "reviewId": "be88045286fcb7ca91e234b37eef511b",
        "reviewFullText": "1 star review",
        "reviewText": "1 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 1,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:58:06+00:00",
        "reviewCreatedOnTime": 1611579486,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #11",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097037,
        "reviewId": "70b57c0433d0221b0788b106fb9fdd5a",
        "reviewFullText": "",
        "reviewText": "",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 5,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:57:48+00:00",
        "reviewCreatedOnTime": 1611579468,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #10",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097036,
        "reviewId": "59cbd1e887e8cce76ef68318b198ddf0",
        "reviewFullText": "4 star review",
        "reviewText": "4 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 4,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:57:35+00:00",
        "reviewCreatedOnTime": 1611579455,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #9",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097034,
        "reviewId": "ac50da2870193abe25ba529597cfbd23",
        "reviewFullText": "",
        "reviewText": "",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 3,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:57:11+00:00",
        "reviewCreatedOnTime": 1611579431,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #8",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097032,
        "reviewId": "f0c8bdd06d6c4ec35de765657e118602",
        "reviewFullText": "2 star review",
        "reviewText": "2 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 2,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:56:55+00:00",
        "reviewCreatedOnTime": 1611579415,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #7",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097031,
        "reviewId": "ef2ad7498e260ec9462d0f27801c86b3",
        "reviewFullText": "",
        "reviewText": "",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 1,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:56:34+00:00",
        "reviewCreatedOnTime": 1611579394,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #6",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097030,
        "reviewId": "d55229232defac9397fc6f12550d4f1f",
        "reviewFullText": "5 star review",
        "reviewText": "5 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 5,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:56:17+00:00",
        "reviewCreatedOnTime": 1611579377,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #5",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097029,
        "reviewId": "3a6dd5070788c36f28c4f78eb349c248",
        "reviewFullText": "4 star review",
        "reviewText": "4 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 4,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:55:57+00:00",
        "reviewCreatedOnTime": 1611579357,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #4",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097028,
        "reviewId": "01223a92f8823251b9678720def5ff43",
        "reviewFullText": "3 star review",
        "reviewText": "3 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 3,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:55:40+00:00",
        "reviewCreatedOnTime": 1611579340,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #3",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097027,
        "reviewId": "5b8c2de55dbb5ccf9f8d033c1859b559",
        "reviewFullText": "2 star review",
        "reviewText": "2 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 2,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:55:21+00:00",
        "reviewCreatedOnTime": 1611579321,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #2",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      },
      {
        "id": 2097026,
        "reviewId": "691d4d278dc23aa9a478e078b9382c2a",
        "reviewFullText": "1 star review",
        "reviewText": "1 star review",
        "numLikes": 0,
        "numComments": 0,
        "numShares": 0,
        "rating": 1,
        "reviewCreatedOn": "2 months ago",
        "reviewCreatedOnDate": "2021-01-25T12:55:06+00:00",
        "reviewCreatedOnTime": 1611579306,
        "reviewerId": null,
        "reviewerUrl": null,
        "reviewerName": "Reviewer #1",
        "reviewerEmail": null,
        "sourceType": "custom",
        "isVerified": false,
        "source": "custom",
        "sourceName": "1-20 Reviews",
        "sourceId": "890cdd7974cdf8aabe6e9051f5a87303bdb933ae",
        "tags": [],
        "href": null,
        "logoHref": null,
        "photos": []
      }
    ]
    
     
    Last edited by a moderator: 19 Gusht 2021

Shpërndaje faqen

Loading...