{"id":20511068,"url":"https://github.com/sean-codes/cs-discount","last_synced_at":"2025-08-01T13:36:33.826Z","repository":{"id":91334711,"uuid":"77491126","full_name":"sean-codes/cs-discount","owner":"sean-codes","description":"Front-End Discount Interface","archived":false,"fork":false,"pushed_at":"2019-12-11T16:41:33.000Z","size":195,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-16T09:07:18.687Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sean-codes.github.io/cs-discount/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sean-codes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-12-28T00:42:49.000Z","updated_at":"2020-01-06T00:41:41.000Z","dependencies_parsed_at":"2023-06-04T12:45:40.026Z","dependency_job_id":null,"html_url":"https://github.com/sean-codes/cs-discount","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-discount","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-discount/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-discount/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sean-codes%2Fcs-discount/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sean-codes","download_url":"https://codeload.github.com/sean-codes/cs-discount/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242117659,"owners_count":20074433,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T20:34:24.957Z","updated_at":"2025-03-05T22:42:24.331Z","avatar_url":"https://github.com/sean-codes.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cs-discount\nFront-End Discount Interface\n\n![Alt text](https://raw.githubusercontent.com/sean-codes/cs-discount/master/img/couponform.png)\n\nDynamically building conditions\n\n![Alt text](https://raw.githubusercontent.com/sean-codes/cs-discount/master/img/conditions.gif)\n\nHTML for inline inputs\n\n    //class: inlineInput to get initialized\n    //data-input: type of input (select, text, number)\n    //data-optiongroup: the group of options to use for this input\n    //name: the value this can be (aggregator, operator, value)\n    //multiple=multiple: for multi select options\n    \u003ca name='aggregator' class='inlineInput' data-input=\"select\" data-optiongroup=\"aggregator\"\u003eALL\u003c/a\u003e\n    \nHTML for nests (combinations)\n    \n    //nest: the type of nest this is\n    //class: nest to get initialized\n    //html: needs a aggregator and value\n    //ul with li and button (will be moving this to javascript side)\n    \u003cdiv data-nest='combination' class='nest'\u003eIf \u003ca name='aggregator' class='inlineInput' data-input=\"select\" data-optiongroup=\"aggregator\"\u003eALL\u003c/a\u003e of these conditions are \u003ca name='value' class='inlineInput' data-input=\"select\" data-optiongroup=\"boolean\"\u003eTRUE\u003c/a\u003e${conditions.deleteButtonHTML}\n        \u003cul\u003e\n            \u003cli class=\"addButtonLi\"\u003e${conditions.addButtonHTML}\u003c/li\u003e\n        \u003c/ul\u003e\n    \u003c/div\u003e\n\nData Structure for options:\n\n    optionName: {\n        options: {\n            label: 'string',\n            value: 'is optional'\n        }\n    }\n    \nData Structure for nests:\n\n    conditions.nests = {\n\t    nestName: {\n\t\t    label: 'Condition Combination',\n\t\t    options: 'combination, productCombination, cart',\n\t\t    priority: 1,\n\t\t    list: {\n  \t\t\t    main: {\n\t  \t\t\t    label: 'Condition Combination',\n\t  \t\t\t    html: `\n\t  \t\t\t\t    \u003cdiv data-nest='main' class='nest'\u003eIf \u003ca name='aggregator' class='inlineInput' data-input=\"select\" data-optiongroup=\"aggregator\"\u003eALL\u003c/a\u003e of these conditions are \u003ca name='value' class='inlineInput' data-input=\"select\" data-optiongroup=\"boolean\"\u003eTRUE\u003c/a\u003e\n\t\t\t\t\t\t    \u003cul\u003e\n\t\t\t\t\t\t\t    \u003cli class=\"addButtonLi\"\u003e${conditions.addButtonHTML}\u003c/li\u003e\n\t\t\t\t\t\t    \u003c/ul\u003e\n\t\t\t\t\t    \u003c/div\u003e`\n\t\t\t    }\n\t\t    }\n\t    }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-codes%2Fcs-discount","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsean-codes%2Fcs-discount","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsean-codes%2Fcs-discount/lists"}