Skip to content

Commit

Permalink
Merge pull request #28 from NikilMunireddy/master
Browse files Browse the repository at this point in the history
final
  • Loading branch information
batch11g6 authored May 13, 2019
2 parents fdcfc2b + b792eb2 commit 98784f6
Show file tree
Hide file tree
Showing 104 changed files with 735 additions and 152 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
48 changes: 26 additions & 22 deletions manufacturer/.firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
asset-manifest.json,1557204106684,483441ee15fb73ea5b98ea2839b2509e8ba5d3ef73cea875897413c46ed5feb1
favicon.ico,1557204098232,c599b7a91ab3627e3538125d9f40adc2d4bf949046984262670545dc7738af06
manifest.json,1557204098232,ed7b98046be74c7d1476b73ebb8cd1f00c2b34443af1525af60b9dd20be9fb9a
index.html,1557204106684,5ee14608badc8740191e1185f50db3df1701edc3810c945753956f301f1cd997
precache-manifest.13912b388e01573d0c424f86784e0594.js,1557204106684,6a50bf881c67276735701291411379db3bdce93ca061501d076ce4067e49b6be
service-worker.js,1557204106684,d6ead3a8a0eb5b1378f7f6ae6fc9fec935cda531657b56b68824d011ea588e3d
static/css/2.e3baaec3.chunk.css,1557204106672,610a7d8fa4bc38f8101c2587539b3ace783627de0ed0ab183736cccdcdcbb961
static/css/main.aeb52962.chunk.css,1557204106664,b4343c599eba9b727cb1def04528d61ad65bb8a057c16cdf6b05abd54ce82b49
static/css/main.aeb52962.chunk.css.map,1557204106672,a56637951e98a51667d8461a48ff809eb167234ec56f1d03205048b088e46a8e
static/css/2.e3baaec3.chunk.css.map,1557204106672,d162c7984df7fff247cf9b5b318b72509f126041004d00b30034bbc5d1841152
static/js/runtime~main.a8a9905a.js,1557204106672,5b0313db8c475761662a933e703f2a6bd16847cdfc34b81915f5dd56862e4e77
static/js/main.6b81c0bf.chunk.js,1557204106664,ca765d20c0545981f49adc9c75277e39e6f226d0619cdec95f40e77fc3ead40e
static/js/runtime~main.a8a9905a.js.map,1557204106672,2510643041ce395196dfc3f9ae31cd72d7127dbd8457479959c6e22dd1b1eaeb
static/js/main.6b81c0bf.chunk.js.map,1557204106672,c903e5d877344d8e10cad51e6a087d83d76a0f0e6dbaad3014b5a1d5ad89e330
static/media/user-group.2c1307ce.png,1557204106672,fc7a6d797ee61a6eff726e35822a2bb1a7bc71f9968f5ade03c4682b53b8a657
static/media/smartchain.4d5d888c.jpg,1557204106664,6b8fcba981d2bafd7158b37362b09f58ceeb66fe64d6420f2f9c1a612b2ce28e
static/media/factory-1.90c2bd33.gif,1557204106672,abeb3e41cde7defae6fff2fb9d1fd8dc8f655b38a428d300b344ba8ebd330cb2
static/js/2.ec6c5352.chunk.js,1557204106672,7332674162c339a65d2b8fe9db0698646aa724ec7d85a57ebe722b33d1e28162
static/media/gepezet.dfeb66b3.gif,1557204106672,342610cda37d4d9541f60b3da32ccbe239d1288c9a3f22e27acaa2083f1d0a50
static/media/pcori_animation_revised-copy.9a461691.gif,1557204106672,25de276f97cf9d71d37264a8f3dfa0c6f2c35faf1ff6deb9eb42acb052d118a1
static/js/2.ec6c5352.chunk.js.map,1557204106684,11c7dcd8d5e539eb1d7ca7148f01993722db2b82aaf703f761e8ff9d94945af0
static/media/404.c05691ec.gif,1557204106672,aac364a00bb61d133e41da7eccafd71ca4f47e52d4392d95e2354ca244de79f1
service-worker.js,1557679212426,f98d4b2a048809b8413d52b90a762e55e4d57b2e8b9816fa1df27423ffdb39bf
asset-manifest.json,1557679220214,a6a8430755137ed63cd7af73cc8ba265929edd4c8fe4dfd192240d7bf98f37e0
manifest.json,1557679212426,ffd5adbd1c1898680db12100ee5aca152cf71a1c15a744aa99a1b8dd3adc4a8d
index.html,1557679220214,ebdd0ebedfb70fd40eff094f7393777fe2d5a96db780f5ba7d947122eb4ced39
favicon.ico,1557679212426,c599b7a91ab3627e3538125d9f40adc2d4bf949046984262670545dc7738af06
precache-manifest.f72d15a5a9b22f24a98c54e0b124ac24.js,1557679220214,6261923f9a5689b5bfbbfca61d19cff37e026bfd72e6005b90e464a80a7fb115
service-worker.js,1557679220214,1cc3eac317b6d598f8eaa34d6672a9c8bba4a8ffa5b2db3d43ee801c51f5c410
worker.js,1557679212426,21ae494b708c010b67dba480123b028a9a8e3596a33d1b1fcefe0dc3d74f98ed
static/css/2.e3baaec3.chunk.css,1557679220214,610a7d8fa4bc38f8101c2587539b3ace783627de0ed0ab183736cccdcdcbb961
static/css/main.4717e4cc.chunk.css,1557679220206,2f485a8cf430dcbde1a47abd7b0258949827823573b91164e8aa491ee677a1de
static/css/main.4717e4cc.chunk.css.map,1557679220214,b91bc397d46ff50105b6d9f5c465b51db7914de17bd9d2fff044813197cbb5a0
static/js/main.8987dd51.chunk.js,1557679220206,dd9290b87a5d77f0847ba595f6ee4884d78e386bfc23a498399955e26776a40a
static/js/runtime~main.a8a9905a.js,1557679220214,5b0313db8c475761662a933e703f2a6bd16847cdfc34b81915f5dd56862e4e77
static/js/runtime~main.a8a9905a.js.map,1557679220214,2510643041ce395196dfc3f9ae31cd72d7127dbd8457479959c6e22dd1b1eaeb
static/css/2.e3baaec3.chunk.css.map,1557679220214,d162c7984df7fff247cf9b5b318b72509f126041004d00b30034bbc5d1841152
static/js/main.8987dd51.chunk.js.map,1557679220214,f00d7d5355e0ee22ee18d4d8c08b154532ebb38d3852451026af576961822b0b
static/media/smartchain.4d5d888c.jpg,1557679220206,6b8fcba981d2bafd7158b37362b09f58ceeb66fe64d6420f2f9c1a612b2ce28e
static/media/user-group.2c1307ce.png,1557679220210,fc7a6d797ee61a6eff726e35822a2bb1a7bc71f9968f5ade03c4682b53b8a657
smartchain.png,1557679212426,5924fe78146228a51848fcf3f6850cc75effb25b9dc592960d49229e50b9bb7c
static/media/factory-1.90c2bd33.gif,1557679220210,abeb3e41cde7defae6fff2fb9d1fd8dc8f655b38a428d300b344ba8ebd330cb2
static/js/2.c2f8b8ac.chunk.js,1557679220214,5e35014cfa82cbf42668137c826ce7ecd5d0f0c9834a5ec386875a2ce42ab515
static/media/gepezet.dfeb66b3.gif,1557679220210,342610cda37d4d9541f60b3da32ccbe239d1288c9a3f22e27acaa2083f1d0a50
static/media/load.640b7b0d.gif,1557679220214,2cc8f036fbbdc4accd128914295345c2de51497fda1fec104acc32f4dd6e82db
static/media/pcori_animation_revised-copy.9a461691.gif,1557679220210,25de276f97cf9d71d37264a8f3dfa0c6f2c35faf1ff6deb9eb42acb052d118a1
static/js/2.c2f8b8ac.chunk.js.map,1557679220222,d587ee57ae69af150647c36d5566dbf53deda996c821396a8e97e730bc3f5de9
static/media/404.c05691ec.gif,1557679220214,aac364a00bb61d133e41da7eccafd71ca4f47e52d4392d95e2354ca244de79f1
47 changes: 47 additions & 0 deletions manufacturer/public/ service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
var doCache = false;

var CACHE_NAME = "my-pwa-cache-v1";

self.addEventListener("activate", event => {
const cacheWhitelist = [CACHE_NAME];
event.waitUntil(
caches.keys().then(keyList =>
Promise.all(
keyList.map(key => {
if (!cacheWhitelist.includes(key)) {
console.log("Deleting cache: " + key);
return caches.delete(key);
}
})
)
)
);
});

self.addEventListener("install", function(event) {
if (doCache) {
event.waitUntil(
caches.open(CACHE_NAME).then(function(cache) {
fetch("manifest.json")
.then(response => {
response.json();
})
.then(assets => {
const urlsToCache = ["/", assets["main.js"]];
cache.addAll(urlsToCache);
console.log("cached");
});
})
);
}
});

self.addEventListener("fetch", function(event) {
if (doCache) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request);
})
);
}
});
9 changes: 7 additions & 2 deletions manufacturer/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="apple-touch-icon" sizes="76x76" href="smartchain.jpg"/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand All @@ -17,6 +18,10 @@

<!--Leaflet css-->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/1.3.1/leaflet.css">

<link rel="stylesheet" href="https://unpkg.com/bulma-modal-fx/dist/css/modal-fx.min.css" />
<script type="text/javascript" src="https://unpkg.com/bulma-modal-fx/dist/js/modal-fx.min.js"></script>

<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Expand All @@ -26,7 +31,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Smart Chain</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
Binary file added manufacturer/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions manufacturer/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "Smart chain",
"name": "Smart portal from manufacturer",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
"src": "logo.png",
"sizes": "192x192",
"type": "image/png"
}
],
"start_url": ".",
"start_url": "/",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
"theme_color": "#000",
"background_color": "#000"
}
60 changes: 60 additions & 0 deletions manufacturer/public/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
var doCache = false;

// Name our cache
var CACHE_NAME = 'my-pwa-cache-v1';

// Delete old caches that are not our current one!
self.addEventListener("activate", event => {
const cacheWhitelist = [CACHE_NAME];
event.waitUntil(
caches.keys()
.then(keyList =>
Promise.all(keyList.map(key => {
if (!cacheWhitelist.includes(key)) {
console.log('Deleting cache: ' + key)
return caches.delete(key);
}
}))
)
);
});

// The first time the user starts up the PWA, 'install' is triggered.
self.addEventListener('install', function(event) {
if (doCache) {
event.waitUntil(
caches.open(CACHE_NAME)
.then(function(cache) {
// Get the assets manifest so we can see what our js file is named
// This is because webpack hashes it
fetch("asset-manifest.json")
.then(response => {
response.json()
})
.then(assets => {
// Open a cache and cache our files
// We want to cache the page and the main.js generated by webpack
// We could also cache any static assets like CSS or images
const urlsToCache = [
"/",
assets["main.js"]
]
cache.addAll(urlsToCache)
console.log('cached');
})
})
);
}
});

// When the webpage goes to fetch files, we intercept that request and serve up the matching files
// if we have them
self.addEventListener('fetch', function(event) {
if (doCache) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request);
})
);
}
});
Binary file added manufacturer/public/smartchain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions manufacturer/public/worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// Flag for enabling cache in production
var doCache = false;
var CACHE_NAME = 'pwa-app-cache';
// Delete old caches
self.addEventListener('activate', event => {
const currentCachelist = [CACHE_NAME];
event.waitUntil(
caches.keys()
.then(keyList =>
Promise.all(keyList.map(key => {
if (!currentCachelist.includes(key)) {
return caches.delete(key);
}
}))
)
);
});
// This triggers when user starts the app
self.addEventListener('install', function(event) {
if (doCache) {
event.waitUntil(
caches.open(CACHE_NAME)
.then(function(cache) {
fetch('asset-manifest.json')
.then(response => {
response.json();
})
.then(assets => {
// We will cache initial page and the main.js
// We could also cache assets like CSS and images
const urlsToCache = [
'/',
assets['main.js']
];
cache.addAll(urlsToCache);
})
})
);
}
});
// Here we intercept request and serve up the matching files
self.addEventListener('fetch', function(event) {
if (doCache) {
event.respondWith(
caches.match(event.request).then(function(response) {
return response || fetch(event.request);
})
);
}
});
2 changes: 1 addition & 1 deletion manufacturer/src/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// https://batch11smartchain.herokuapp.com/ (group11 account)

export default {
DOMAIN_URL: 'http://127.0.0.1:8000/',
DOMAIN_URL: 'https://batch11smartchain.herokuapp.com/',

PASSWORD_CHECK: 'api/validateManufacturer/validate/',
ADD_PRODUCT: 'api/productdetails/collectdetails/',
Expand Down
Binary file added manufacturer/src/assets/load.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions manufacturer/src/components/HeaderTemplate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import './components.css'


export default class HeaderTemplate extends Component {
constructor(){
constructor() {
super()
this.handleLogout= this.handleLogout.bind(this)
this.handleLogout = this.handleLogout.bind(this)
}
handleLogout(){
handleLogout() {
sessionStorage.removeItem('login')
sessionStorage.removeItem('secret')
sessionStorage.removeItem('username')
Expand Down Expand Up @@ -68,7 +68,7 @@ export default class HeaderTemplate extends Component {

</span>
<span>
<a href="/" onClick={this.handleLogout}>
<a href="/" onClick={this.handleLogout}>
<Link to={'/'}>Logout</Link>
</a>
</span>
Expand All @@ -90,17 +90,17 @@ export default class HeaderTemplate extends Component {
<p class="control">
<a class=" ">
<span class="icon">
<img src={userlogo}
width="120%"
/>
<img src={userlogo}
width="120%"
/>
</span>&nbsp;&nbsp;
<span style={{color: "#FF500d"}}>
<span style={{ color: "#FF500d" }}>
{sessionStorage.getItem('username')}
</span>
</a>
</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
</div>
</div>
</div>
</nav>
Expand Down
Loading

0 comments on commit 98784f6

Please sign in to comment.