commit c5cf1c0fbeeff159b88a0fa2a282067098288992 Author: Jennyver Seztiani Luxman <114470554+JenJenFenFen@users.noreply.github.com> Date: Tue Mar 28 09:41:43 2023 +0700 make a new Hino web diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a35517b --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build +/out + +# misc +.env +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +package-lock.json + +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# package +/dist +/.next diff --git a/README.md b/README.md new file mode 100644 index 0000000..bf8569b --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Redux example + +This example shows how to integrate Redux in Next.js. + +Usually splitting your app state into `pages` feels natural but sometimes you'll want to have global state for your app. This is an example on how you can use Redux that also works with Next.js's universal rendering approach. + +In the first example we are going to display a digital clock that updates every second. The first render is happening in the server and then the browser will take over. To illustrate this, the server rendered clock will have a different background color (black) than the client one (grey). + +The trick here for supporting universal Redux is to separate the cases for the client and the server. When we are on the server we want to create a new store every time, otherwise different users data will be mixed up. If we are in the client we want to use always the same store. That's what we accomplish on `store.js`. + +All components have access to the Redux store using `useSelector`, `useDispatch` or `connect` from `react-redux`. + +On the server side every request initializes a new store, because otherwise different user data can be mixed up. On the client side the same store is used, even between page changes. + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example): + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-redux&project-name=with-redux&repository-name=with-redux) + +## How to use + +Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example: + +```bash +npx create-next-app --example with-redux with-redux-app +# or +yarn create next-app --example with-redux with-redux-app +``` + +Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)). diff --git a/api/new/company/company.js b/api/new/company/company.js new file mode 100644 index 0000000..638a837 --- /dev/null +++ b/api/new/company/company.js @@ -0,0 +1,138 @@ +import apollo from "../../../lib/apollo"; + + +async function companies(input){ + var res = await apollo.query( + ` + query($input: String!){ + companies{ + data{ + attributes{ + Business_name + Name + Description + Icon { + data { + attributes{ + url + } + } + } + Background{ + data{ + attributes{ + url + } + } + } + Website + } + } + } + main_banner:companies(filters:{Name:{eq:$input}}){ + data{ + attributes{ + Contents(filters :{Type:{eq:"Main_Banner"}}){ + data{ + attributes{ + Title + Description + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + } + } + } + news:companies(filters:{Name:{eq:$input}}){ + data{ + id + attributes{ + Contents(filters:{Type:{eq:"News"}}){ + data{ + id + attributes{ + Title + Description + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + } + } + } + gallery:companies(filters:{Name:{eq:$input}}){ + data{ + attributes{ + Gallery{ + data{ + attributes{ + url + } + } + } + } + } + } + }`,"",{ + "input":input + } + ); + return res; +} + +// async function getID(partner, token = "") { + // var res = await apollo.query( + // ` + // query($input : String!){ + // businessPartners(where:{name_contains:$input}){ + // id + // } + // }`, + // token, + // { + // input: partner, + // } + // ); + // return res; +// } + +// async function getData(partner,token=''){ +// var res = await apollo.query( +// ` +// query($input : String!){ +// businessPartners(where:{name_contains:$input}){ +// id, +// name, +// icon{ +// url +// }, +// background{ +// url +// }, +// carousel{ +// url +// } +// } +// } +// ` +// ); +// } + +module.exports = { + // getID: getID, + // getData:getData, + companies:companies, +}; diff --git a/api/new/company/index.js b/api/new/company/index.js new file mode 100644 index 0000000..196339c --- /dev/null +++ b/api/new/company/index.js @@ -0,0 +1,336 @@ +import apollo from "../../../lib/apollo"; + + +async function allCompanies(){ + var res = await apollo.query( + ` + query($input: String!){ + companies{ + data{ + attributes{ + Ready + Business_name + Name + Description + Icon { + data { + attributes{ + url + } + } + } + Background{ + data{ + attributes{ + url + } + } + } + Website + } + } + } + social:companies(filters:{Name:{eq:$input}}){ + data{ + attributes{ + Social_Medias{ + data{ + attributes{ + Type + Link + } + } + } + } + } + } + dealers:companies(filters:{Name:{eq:$input}}){ + data{ + attributes{ + Dealers{ + data{ + attributes{ + Image{ + data{ + attributes{ + url + } + } + } + Name + Kota + Address + Gmap + Telp + Region{ + data{ + attributes{ + Name + } + } + } + Email + } + } + } + } + } + } + main_banner:companies(filters:{Name:{eq:$input}}){ + data{ + id + attributes{ + Contents(filters :{Type:{eq:"Main_Banner"}}){ + data{ + attributes{ + Title + Description + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + } + } + } + news:companies(filters:{Name:{eq:$input}}){ + data{ + id + attributes{ + Contents(filters:{Type:{eq:"News"}}){ + data{ + id + attributes{ + Title + Description + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + } + } + } + gallery:companies(filters:{Name:{eq:$input}}){ + data{ + attributes{ + Gallery{ + data{ + attributes{ + url + } + } + } + } + } + } + }`,"",{ + "input":"Thamrin" + } + ); + return res; +} + +async function companyIcon(input){ + var res = await apollo.query( + ` + query($input: ID!){ + company(id:$input){ + data{ + attributes{ + Icon { + data { + attributes{ + url + } + } + } + } + } + } + }`,"",{ + "input":input + } + ); + return res; +} + +async function companyByName(input){ + var res = await apollo.query( + ` + query($input: String!){ + Main_Banner:companies(filters:{Name:{containsi:$input}}){ + data{ + id + attributes{ + Contents(filters :{Type:{eq:"Main_Banner"}}){ + data{ + attributes{ + Title + Description + Image{ + data{ + attributes{ + url + } + } + } + Link + } + } + } + } + } + } + companies(filters:{Name:{eq:$input}}){ + data{ + id + attributes{ + Business_name + Name + Description + Visi + Misi + Address + Email + Phone + Icon { + data { + attributes{ + url + } + } + } + Banner{ + data{ + id + attributes{ + url + } + } + } + Dealers{ + data{ + attributes{ + Image{ + data{ + attributes{ + url + } + } + } + Name + Kota + Address + Gmap + Telp + Region{ + data{ + attributes{ + Name + } + } + } + Email + } + } + } + Featured:Products(filters:{Featured:{eq:true}}){ + data{ + attributes{ + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + Background{ + data{ + attributes{ + url + } + } + } + Gallery{ + data{ + attributes{ + url + } + } + } + Social_Medias{ + data{ + attributes{ + Type + Link + } + } + } + } + } + } + }`,"",{ + "input":input + } + ); + return res; +} + +async function getID(partner, token = "") { + var res = await apollo.query( + ` + query($input : String!){ + businessPartners(where:{name_contains:$input}){ + id + } + }`, + token, + { + input: partner, + } + ); + return res; +} + +// async function getData(partner,token=''){ +// var res = await apollo.query( +// ` +// query($input : String!){ +// businessPartners(where:{name_contains:$input}){ +// id, +// name, +// icon{ +// url +// }, +// background{ +// url +// }, +// carousel{ +// url +// } +// } +// } +// ` +// ); +// } + +module.exports = { + getID: getID, + companyByName:companyByName, + companies:allCompanies, + companyIcon:companyIcon, +}; diff --git a/api/new/dealer/index.js b/api/new/dealer/index.js new file mode 100644 index 0000000..375cade --- /dev/null +++ b/api/new/dealer/index.js @@ -0,0 +1,81 @@ +import apollo from "../../../lib/apollo"; + + +async function dealersByCompanyId(id){ + var res = await apollo.query( + ` + query($input : ID!){ + dealers(filters:{Company:{id:{eq:$input}}}){ + data{ + attributes{ + Address + Name + Telp + Email + Kota + Gmap + Image{ + data{ + attributes{ + url + } + } + } + Region{ + data{ + attributes{ + Name + } + } + } + } + } + } + }`,'',{ + input:id + } + ); + return res; +} + +async function dealersByCompanyName(name){ + var res = await apollo.query( + ` + query($input : String!){ + dealers(filters:{Company:{Name:{eq:$input}}}){ + data{ + attributes{ + Address + Name + Telp + Email + Kota + Gmap + Image{ + data{ + attributes{ + url + } + } + } + Region{ + data{ + attributes{ + Name + } + } + } + } + } + } + }`,'',{ + "input":name + } + ); + return res; +} + +module.exports = { + dealersByCompanyId:dealersByCompanyId, + dealersByCompanyName:dealersByCompanyName, +}; diff --git a/api/new/industry/index.js b/api/new/industry/index.js new file mode 100644 index 0000000..94288f1 --- /dev/null +++ b/api/new/industry/index.js @@ -0,0 +1,23 @@ +import apollo from "../../../lib/apollo"; + + +async function industries(){ + var res = await apollo.query( + ` + query{ + industries{ + data{ + attributes{ + Name + Icon + } + } + } + }` + ); + return res; +} + +module.exports = { + industries:industries, +}; diff --git a/api/new/industry/industry.js b/api/new/industry/industry.js new file mode 100644 index 0000000..94288f1 --- /dev/null +++ b/api/new/industry/industry.js @@ -0,0 +1,23 @@ +import apollo from "../../../lib/apollo"; + + +async function industries(){ + var res = await apollo.query( + ` + query{ + industries{ + data{ + attributes{ + Name + Icon + } + } + } + }` + ); + return res; +} + +module.exports = { + industries:industries, +}; diff --git a/api/new/news/index.js b/api/new/news/index.js new file mode 100644 index 0000000..4a31e85 --- /dev/null +++ b/api/new/news/index.js @@ -0,0 +1,115 @@ +import apollo from "../../../lib/apollo"; + +async function newsByCompanyId(companyId){ + var res = apollo.query( + ` + query($input: ID!){ + contents(sort:"publishedAt:desc" filters:{Type:{eq:"News"} Company:{id:{eq:$input}}}){ + data{ + id + attributes{ + Title + publishedAt + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + } + `,"",{ + "input" : companyId + } + ); + return res; +} + +async function newsById(id){ + var res = await apollo.query( + ` + query($input: ID!){ + content(id:$input){ + data{ + attributes{ + Company{ + data{ + id + attributes{ + Name + Description + Address + Phone + Email + } + } + } + Title + Image{ + data{ + attributes{ + url + } + } + } + Description + publishedAt + } + } + } + }`,"",{ + "input":id + } + ); + return res; +} + +async function newsByCompanyName(name,pageSize=999,page=1){ + var res = await apollo.query( + ` + query($input: String!){ + contents(sort:"publishedAt:desc" filters:{Type:{eq:"News"} Company:{Name:{eq:$input}}} pagination:{pageSize:${pageSize},page:${page}}){ + meta{ + pagination{ + pageCount + } + } + data{ + id + attributes{ + Company{ + data{ + id + attributes{ + Name + Description + } + } + } + Title + Image{ + data{ + attributes{ + url + } + } + } + publishedAt + } + } + } + }`,"",{ + "input":name + } +); +return res; +} + +module.exports = { + newsById:newsById, + newsByCompanyId:newsByCompanyId, + newsByCompanyName:newsByCompanyName +}; diff --git a/api/new/product/index.js b/api/new/product/index.js new file mode 100644 index 0000000..01f63c1 --- /dev/null +++ b/api/new/product/index.js @@ -0,0 +1,243 @@ +import apollo from "@/lib/apollo.js"; + +async function GetDetailProduct(id, token = "") { + var res = await apollo.query( + ` + query($input : ID!){ + product(id:$input){ + data{ + id + attributes{ + Company{ + data{ + attributes{ + Name + } + } + } + Category{ + data{ + attributes{ + Name + } + } + } + Name + Description + Product_parts{ + data{ + attributes{ + Name + Part_Code + Product_prices{ + data{ + attributes{ + Price + } + } + } + } + } + } + Stock + Discount + Machine + Dimension + Structure + Voltage + Image{ + data{ + attributes{ + url + } + } + } + Product_colors{ + data{ + attributes{ + Color + Image{ + data{ + attributes{ + url + } + } + } + } + } + } + Product_prices{ + data{ + attributes{ + Price + region{ + data{ + attributes{ + Name + } + } + } + } + } + } + } + } + } + } + `, + token, { + "input": id + } + ); + return res; +} + +async function GetProductImgColor(id, token = "") { + var res = await apollo.query( + ` + query($input: ID!) { + productImageColors(where:{id:$input}) { + id + name + img{ + url + } + } + } + `, + token, { + "input": id + } + ); + return res; +} +async function GetProductCategory(token=''){ + var res = await apollo.query( + ` + query{ + productCategories{ + data{ + attributes{ + Name + } + } + } + } + `,token + ); + return res; +} +async function GetProductOthers(company,category,current,pageSize=999,page=1,token=""){ + var allProduct= ''; + category.forEach(i => { + allProduct = allProduct+` + ${i.replace(' ','_')}:products(pagination:{pageSize:${pageSize},page:${(i.toLowerCase()==current)?page:1}} filters:{Category:{Name:{containsi:"${i}"}} Company:{id:{eq:$input}}}){ + meta{ + pagination{ + pageCount + total + } + } + data{ + id + attributes{ + Name + Image{ + data{ + attributes{ + url + } + } + } + Discount + Stock + Product_prices{ + data{ + attributes{ + Price + region{ + data{ + attributes{ + Name + } + } + } + } + } + } + } + } + } + `; + }); + var res = await apollo.query( + ` + query($input : ID!){ + ${allProduct} + } + `,token,{ + input:company, + } + ); + return res; +} +async function GetProduct(company,category,pageSize=999,page=1, token = "") { + var res = await apollo.query( + ` + query($input : ID! $cat: String!){ + products(pagination:{pageSize:${pageSize},page:${page}} filters:{Category:{Name:{eq:$cat}} Company:{id:{eq:$input}}}){ + meta{ + pagination{ + pageCount + total + } + } + data{ + id + attributes{ + Name + Image{ + data{ + attributes{ + url + } + } + } + Product_prices{ + data{ + attributes{ + Price + region{ + data{ + attributes{ + Name + } + } + } + } + } + } + } + } + } + } + `, + token, + { + input:company, + cat:category, + } + ); + return res; +} + +module.exports = { + + GetProductImgColor: GetProductImgColor, + GetProduct: GetProduct, + GetProductCategory:GetProductCategory, + + //detail + GetDetailProduct: GetDetailProduct, + GetProductOthers:GetProductOthers, +}; diff --git a/api/new/sales/index.js b/api/new/sales/index.js new file mode 100644 index 0000000..eaa14a2 --- /dev/null +++ b/api/new/sales/index.js @@ -0,0 +1,73 @@ +import apollo from "@/lib/apollo"; + + +async function salesbyCompany(company){ + var res = await apollo.query( + ` + query($input : ID!){ + salesmen(filters:{Company:{id:{eq:$input}}}){ + data{ + id + attributes{ + Name + Telp + WA + Email + DP{ + data{ + attributes{ + url + } + } + } + } + } + } + }`,"",{ + "input":company + } +); +return res; +} + +async function salesmanDetails(id){ + var res = await apollo.query( + ` + query($input : ID!){ + salesman(id:$input){ + data{ + id + attributes{ + Name + Telp + WA + Email + DP{ + data{ + attributes{ + url + } + } + } + Company{ + data{ + attributes{ + Name + Website + } + } + } + } + } + } + }`,"",{ + "input":id + } + ); + return res; + } + +module.exports = { + salesbyCompany:salesbyCompany, + salesmanDetails:salesmanDetails, +}; diff --git a/api/new/social/index.js b/api/new/social/index.js new file mode 100644 index 0000000..2bd37a2 --- /dev/null +++ b/api/new/social/index.js @@ -0,0 +1,27 @@ +import apollo from "../../../lib/apollo"; + +async function socialByCompany(companyId){ + var res = apollo.query( + ` + query($input : ID!){ + socialMedias(filters:{Company:{id:{eq:$input}}}){ + data{ + attributes{ + Type + Link + } + } + } + } + `,"",{ + "input" : companyId + } + ); + return res; +} + + + +module.exports = { + socialByCompany:socialByCompany, +}; diff --git a/api/others/auth/auth.js b/api/others/auth/auth.js new file mode 100644 index 0000000..31f4660 --- /dev/null +++ b/api/others/auth/auth.js @@ -0,0 +1,145 @@ +import apollo from "@/lib/apollo.js"; +import partners from "../../new/company"; + +async function register(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input : RegisterInput!){ + register( input:{data:$input} ) + { + user{ + id + } + } + } + `, + token, + { + input: content, + } + ); + return res; +} + +async function login(partner, email, password, token = "") { + var cookiesData = {}; + var res = await apollo.mutation( + ` + mutation($email: String! $password: String!) { + login(input: { identifier: $email, password: $password }) { + user{ + id + username + } + jwt + } + }`, + token, + { + email: email, + password: password, + } + ); + + if (res["STATUS"] == 1) { + token = res["DATA"]["login"]["jwt"]; + res = await apollo.mutation( + ` + query{ + self{ + id + username + email + role{ + name + description + } + partners_login_states{ + id + business_partner{ + id + name + } + } + } + } + `, + token + ); + } + + if (res["STATUS"] == 1) { + var user = res["DATA"]["self"]; + var sessions = []; + for (const i of user["partners_login_states"]) { + sessions.push(i.business_partner); + } + sessions = sessions.filter( + (i) => + i.business_partner && + i.business_partner.name.toUpperCase() == partner.toUpperCase() + ); + if (sessions.length == 0) { + res = await partners.getID(partner, token); + if (res["STATUS"] == 1) { + res = await apollo.mutation( + ` + mutation($input: PartnersLoginStateInput!) { + createPartnersLoginState(input:{data:$input}){ + partnersLoginState{ + id + business_partner{ + id + name + } + } + } + } + `, + token, + { + input: { + user: user["id"], + business_partner: + res["DATA"]["businessPartners"][0]["id"], + }, + } + ); + if (res["STATUS"] == 1) { + user["partners_login_states"].push( + res["DATA"]["createPartnersLoginState"][ + "partnersLoginState" + ] + ); + } + } + } + cookiesData["user"] = user; + cookiesData["token"] = token; + } + return { res: res, cookies: cookiesData }; +} + +async function logout(id, token = "") { + var res = await apollo.mutation( + ` + mutation($input: ID!) { + deletePartnersLoginState(input:{where:{id:$input}}){ + partnersLoginState{ + id + } + } + }`, + token, + { + input: id, + } + ); + return res; +} + +module.exports = { + register: register, + login: login, + logout: logout, +}; diff --git a/api/others/carrer/carrer.js b/api/others/carrer/carrer.js new file mode 100644 index 0000000..66aaf34 --- /dev/null +++ b/api/others/carrer/carrer.js @@ -0,0 +1,267 @@ +import apollo from "@/lib/apollo.js"; + +async function GetCarrerS1Yamaha(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "S1" business_partner: "1"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerD3Yamaha(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "D3" business_partner: "1"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerSMAYamaha(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "SMA" business_partner: "1"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetDetailCarrer(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + carrers(where:{id:$input}) + { + name + description + category + img{ + url + } + start_regis + until_regis + name_description + } + } + `, + token, + { + "input": id + } + ); + return res; +} + +async function GetCarrerS1Suzuki(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "S1" business_partner:"2"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerD3Suzuki(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "D3" business_partner:"2"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerSMASuzuki(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "SMA" business_partner:"2"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerS1Honda(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "S1" business_partner:"3"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerD3Honda(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "D3" business_partner:"3"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerSMAHonda(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "SMA" business_partner:"3"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerS1Hino(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "S1" business_partner:"4"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerD3Hino(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "D3" business_partner:"4"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +async function GetCarrerSMAHino(token="") { + var res = await apollo.query( + ` + query { + carrers(where: {category: "SMA" business_partner:"4"}) + { + id + name + start_regis + until_regis + name_description + } + }`, + token + ); + return res; +} + +module.exports = { + //yamaha + GetCarrerS1Yamaha:GetCarrerS1Yamaha, + GetCarrerD3Yamaha:GetCarrerD3Yamaha, + GetCarrerSMAYamaha:GetCarrerSMAYamaha, + + //suzuki + GetCarrerS1Suzuki:GetCarrerS1Suzuki, + GetCarrerD3Suzuki:GetCarrerD3Suzuki, + GetCarrerSMASuzuki:GetCarrerSMASuzuki, + + //honda + GetCarrerS1Honda:GetCarrerS1Honda, + GetCarrerD3Honda:GetCarrerD3Honda, + GetCarrerSMAHonda:GetCarrerSMAHonda, + + //hino + GetCarrerS1Hino:GetCarrerS1Hino, + GetCarrerD3Hino:GetCarrerD3Hino, + GetCarrerSMAHino:GetCarrerSMAHino, + + GetDetailCarrer:GetDetailCarrer, +}; \ No newline at end of file diff --git a/api/others/courier/courier.js b/api/others/courier/courier.js new file mode 100644 index 0000000..3b222b7 --- /dev/null +++ b/api/others/courier/courier.js @@ -0,0 +1,23 @@ +import apollo from "@/lib/apollo.js"; + +async function GetCourier(filter, token="") { + var res = await apollo.query( + ` + query { + couriers{ + id + name + duration + price + description + } + } + `, + token + ); + return res; +} + +module.exports = { + GetCourier: GetCourier, +}; \ No newline at end of file diff --git a/api/others/dealer/dealer.js b/api/others/dealer/dealer.js new file mode 100644 index 0000000..58eba9a --- /dev/null +++ b/api/others/dealer/dealer.js @@ -0,0 +1,56 @@ +import apollo from "@/lib/apollo.js"; + +async function GetDealers(filter, token="") { + var res = await apollo.query( + ` + query { ${(filter!="")?`name: "${filter}"`:""} + dealers + { + id + name + kota_dealer + address + telp + email + location + img{ + url + } + } + } + `, + token + ); + return res; +} + +async function GetHomeDealer(token="", start = 0) { + var res = await apollo.query( + ` + query($start: Int!) { + dealers(limit:6,start:$start){ + id + name + kota_dealer + address + telp + email + location + img{ + url + } + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +module.exports = { + GetDealers: GetDealers, + GetHomeDealer: GetHomeDealer, +}; diff --git a/api/others/home/businessPartner.js b/api/others/home/businessPartner.js new file mode 100644 index 0000000..32d44e1 --- /dev/null +++ b/api/others/home/businessPartner.js @@ -0,0 +1,23 @@ +import apollo from "@/lib/apollo.js"; + +async function GetbusinessPartners(token = "") { + var res = await apollo.query( + ` + query{ + businessPartners + { + name + img{ + url + } + } + } + `, + token + ); + return res; +} + +module.exports = { + GetbusinessPartners: GetbusinessPartners, +}; \ No newline at end of file diff --git a/api/others/home/carousel.js b/api/others/home/carousel.js new file mode 100644 index 0000000..087c6d4 --- /dev/null +++ b/api/others/home/carousel.js @@ -0,0 +1,76 @@ +import apollo from "@/lib/apollo.js"; + +async function GetCarouselsYamaha(token="") { + var res = await apollo.query( + ` + query{ + carousels(where: { business_partner: "1" }) + { + img{ + url + } + } + } + `, + token + ); + return res; +} + +async function GetCarouselsSuzuki(token="") { + var res = await apollo.query( + ` + query { + carousels(where: { business_partner: "2" }) { + id + img { + url + } + } + } + `, + token + ); + return res; +} + +async function GetCarouselsHonda(token="") { + var res = await apollo.query( + ` + query { + carousels(where: { business_partner: "3" }) { + id + img { + url + } + } + } + `, + token + ); + return res; +} + +async function GetCarouselsHino(token="") { + var res = await apollo.query( + ` + query { + carousels(where: { business_partner: "4" }) { + id + img { + url + } + } + } + `, + token + ); + return res; +} + +module.exports = { + GetCarouselsYamaha:GetCarouselsYamaha, + GetCarouselsSuzuki:GetCarouselsSuzuki, + GetCarouselsHonda:GetCarouselsHonda, + GetCarouselsHino:GetCarouselsHino, +}; \ No newline at end of file diff --git a/api/others/home/service.js b/api/others/home/service.js new file mode 100644 index 0000000..5fddd91 --- /dev/null +++ b/api/others/home/service.js @@ -0,0 +1,42 @@ +import apollo from "@/lib/apollo.js"; + +async function GetservicesYamaha(token="") { + var res = await apollo.query( + ` + query{ + services + { + name + img{ + url + } + } + } + `, + token + ); + return res; +} + +async function GetservicesSuzuki(token="") { + var res = await apollo.query( + ` + query{ + services + { + name + img{ + url + } + } + } + `, + token + ); + return res; +} + +module.exports = { + GetservicesYamaha: GetservicesYamaha, + GetservicesSuzuki:GetservicesSuzuki, +}; \ No newline at end of file diff --git a/api/others/latest_news/news.js b/api/others/latest_news/news.js new file mode 100644 index 0000000..0d9a5ca --- /dev/null +++ b/api/others/latest_news/news.js @@ -0,0 +1,229 @@ +import apollo from "@/lib/apollo.js"; + +async function GetNewsYamaha(token="", start = 0) { + var res = await apollo.query( + ` + query($start: Int!) { + latestNews(limit:6,start:$start) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetOtherNewsYamaha(token="", start = 0) { + var res = await apollo.query( + ` + query($start: Int!) { + latestNews(limit:3,start:$start) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetNewsSuzuki(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "2" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetOtherNewsSuzuki(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "2" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetNewsHonda(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "3" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetOtherNewsHonda(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "3" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetNewsHino(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "4" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetOtherNewsHino(token="", start = 0) { + var res = await apollo.query( + ` + query{ + latestNews(where: { business_partner: "4" }) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + start: start, + } + ); + return res; +} + +async function GetDetailNews(id, token="") { + var res = await apollo.query( + ` + query($input: ID!) { + latestNews(where:{id:$input}) + { + id + title + description + img{ + url + } + published_at + } + } + `, + token, + { + "input": id + } + ); + return res; +} + +module.exports = { + GetNewsYamaha: GetNewsYamaha, + GetOtherNewsYamaha:GetOtherNewsYamaha, + GetNewsSuzuki:GetNewsSuzuki, + GetOtherNewsSuzuki:GetOtherNewsSuzuki, + GetNewsHonda:GetNewsHonda, + GetOtherNewsHonda:GetOtherNewsHonda, + GetNewsHino:GetNewsHino, + GetOtherNewsHino:GetOtherNewsHino, + GetDetailNews: GetDetailNews, +}; \ No newline at end of file diff --git a/api/others/product/product.js b/api/others/product/product.js new file mode 100644 index 0000000..e99fb51 --- /dev/null +++ b/api/others/product/product.js @@ -0,0 +1,94 @@ +import apollo from "@/lib/apollo.js"; + +async function GetDetailProduct(id, token = "") { + var res = await apollo.query( + ` + query($input: ID!){ + products(where:{id:$input}) + { + id + name + price + price1 + price2 + discount + img{ + url + } + product_otrs { + id + name + price + } + product_image_colors{ + id + name + img{ + url + } + } + description + spesifikasi_mesin + spesifikasi_dimensi + spesifikasi_rangka + spesifikasi_kelistrikan + film + stock + } + } `, + token, { + "input": id + } + ); + return res; +} + +async function GetProductImgColor(id, token = "") { + var res = await apollo.query( + ` + query($input: ID!) { + productImageColors(where:{id:$input}) { + id + name + img{ + url + } + } + } + `, + token, { + "input": id + } + ); + return res; +} + +async function GetProduct(filter, token = "") { + var res = await apollo.query( + ` + query { + products(where: { ${(filter!="")?`name: "${filter}"`:""} }){ + id + name + price + price1 + price2 + discount + img { + url + } + } + }`, + token + ); + return res; +} + +module.exports = { + + GetProductImgColor: GetProductImgColor, + GetProduct: GetProduct, + + //detail + GetDetailProduct: GetDetailProduct, +}; diff --git a/api/others/product/product_hino.js b/api/others/product/product_hino.js new file mode 100644 index 0000000..e69de29 diff --git a/api/others/product/product_honda.js b/api/others/product/product_honda.js new file mode 100644 index 0000000..e69de29 diff --git a/api/others/product/product_suzuki.js b/api/others/product/product_suzuki.js new file mode 100644 index 0000000..48c641b --- /dev/null +++ b/api/others/product/product_suzuki.js @@ -0,0 +1,52 @@ +import apollo from "@/lib/apollo.js"; + +async function GetProductSuzuki(token = "") { + var res = await apollo.query( + ` + query{ + productsSuzukis{ + id + name + description + price1 + price2 + img{ + url + } + } + } + + `, + token + ); + return res; +} + +async function GetDetailProduct(id, token = "") { + var res = await apollo.query( + ` + query($input: ID!){ + productsSuzukis(where:{id:$input}) + { + id + name + price1 + price2 + description + stock + img{ + url + } + } + } `, + token, { + "input": id + } + ); + return res; +} + +module.exports = { + GetProductSuzuki: GetProductSuzuki, + GetDetailProduct: GetDetailProduct, +}; diff --git a/api/others/profile/profile.js b/api/others/profile/profile.js new file mode 100644 index 0000000..9dc2f90 --- /dev/null +++ b/api/others/profile/profile.js @@ -0,0 +1,48 @@ +import apollo from "@/lib/apollo.js"; + +async function profile(token="") { + var res = await apollo.query( + ` + query{ + users(where: { id: "13" }){ + id + username + email + firstName + lastName + telp + address + } + } + `, + token + ); + return res; +} + +async function GetDetailProfile(id, token = "") { + var res = await apollo.query( + ` + query($input: ID!){ + users(where:{id:$input}) + { + id + username + email + firstName + lastName + telp + address + } + } `, + token, { + "input": id + } + ); + return res; +} + +module.exports = { + profile:profile, + GetDetailProfile: GetDetailProfile, +}; \ No newline at end of file diff --git a/api/others/sales/sales-mercy.js b/api/others/sales/sales-mercy.js new file mode 100644 index 0000000..586be74 --- /dev/null +++ b/api/others/sales/sales-mercy.js @@ -0,0 +1,60 @@ +import apollo from "@/lib/apollo.js"; + +async function GetSalesMerci(token = "") { + var res = await apollo.query( + ` + query{ + salesMercies + { + id + name + telp + wa + email + job_title + company + start_on + end_on + foto{ + url + } + } + } + `, + token + ); + return res; +} + +async function GetDetailSalesMerci(id, token = "") { + var res = await apollo.query( + ` + query($input: ID!){ + salesMercies(where:{id:$input}) + { + id + name + telp + wa + email + job_title + company + start_on + end_on + foto{ + url + } + } + } + `, + token, { + "input": id + } + ); + return res; +} + +module.exports = { + GetSalesMerci: GetSalesMerci, + GetDetailSalesMerci:GetDetailSalesMerci +}; \ No newline at end of file diff --git a/api/others/shop/cart.js b/api/others/shop/cart.js new file mode 100644 index 0000000..a2275fe --- /dev/null +++ b/api/others/shop/cart.js @@ -0,0 +1,28 @@ +import apollo from "lib/apollo.js"; + +async function GetCartProduct(token = "") { + var res = await apollo.query( + ` + query + { + carts + { + id + product_otr + product_name + product_price + product_color + product_img{ + url + } + } + } + `, + token, + ); + return res; +} + +module.exports = { + GetCartProduct: GetCartProduct, +}; \ No newline at end of file diff --git a/api/others/shop/checkout.js b/api/others/shop/checkout.js new file mode 100644 index 0000000..6285710 --- /dev/null +++ b/api/others/shop/checkout.js @@ -0,0 +1,28 @@ +import apollo from "@/lib/apollo.js"; + +async function GetCheckoutproduct(token = "") { + var res = await apollo.query( + ` + query{ + checkouts{ + id + transaction_id + product_img + { + url + } + product_name + product_color + product_quantity + product_total + } + } + `, + token + ); + return res; +} + +module.exports = { + GetCheckoutproduct: GetCheckoutproduct, +}; \ No newline at end of file diff --git a/api/others/sparepart/sparepart.js b/api/others/sparepart/sparepart.js new file mode 100644 index 0000000..3dc6a0d --- /dev/null +++ b/api/others/sparepart/sparepart.js @@ -0,0 +1,259 @@ +import apollo from "@/lib/apollo.js"; + +async function GetSparepartYGP(filter, token="") { + var res = await apollo.query( + ` + query{ + ygParts(where: { ${(filter!="")?`name: "${filter}"`:""} }){ + id + name + img{ + url + } + price1 + price2 + discount + ygp_units{ + name + part_code + price + } + } + } + `, + token + ); + return res; +} + +async function GetSparepartYamalube(filter, token="") { + var res = await apollo.query( + ` + query { + yamalubes(where: { ${(filter!="")?`name: "${filter}"`:""} }) { + id + name + part_code + price + description + stock + discount + img{ + url + } + } + } + `, + token + ); + return res; +} + +async function GetHelmet(filter, token="") { + var res = await apollo.query( + ` + query { + helmets(where: { ${(filter!="")?`name: "${filter}"`:""} }){ + id + name + price + discount + img { + url + } + } + }`, + token + ); + return res; +} + +async function GetApparel(filter, token="") { + var res = await apollo.query( + ` + query { + apparels(where: { ${(filter!="")?`name: "${filter}"`:""} }){ + id + name + price + discount + img { + url + } + } + }`, + token + ); + return res; +} + +async function GetAcc(filter, token="") { + var res = await apollo.query( + ` + query { + accessories(where: { ${(filter!="")?`name: "${filter}"`:""} }){ + id + name + price + discount + img { + url + } + } + }`, + token + ); + return res; +} + +async function GetYGPDetail(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + ygParts(where:{id:$input}) + { + id + name + img{ + url + } + discount + description + price1 + price2 + ygp_units{ + name + part_code + price + description + } + } + } `, + token, + { + "input": id + } + ); + return res; +} + +async function GetYamalubeDetail(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + yamalubes(where:{id:$input}) + { + id + name + description + price + part_code + discount + img { + url + } + stock + } + } `, + token, + { + "input": id + } + ); + return res; +} + +async function GetHelmetDetail(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + helmets(where:{id:$input}) + { + id + name + description + price + part_code + discount + img { + url + } + stock + } + } `, + token, + { + "input": id + } + ); + return res; +} + +async function GetApparelDetail(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + apparels(where:{id:$input}) + { + id + name + description + price + part_code + discount + img { + url + } + stock + } + } `, + token, + { + "input": id + } + ); + return res; +} + +async function GetAccDetail(id, token="") { + var res = await apollo.query( + ` + query($input: ID!){ + accessories(where:{id:$input}) + { + id + name + description + price + part_code + discount + img { + url + } + stock + } + } `, + token, + { + "input": id + } + ); + return res; +} + +module.exports = { + + //collection type YGP + GetSparepartYGP: GetSparepartYGP, + GetSparepartYamalube: GetSparepartYamalube, + GetHelmet: GetHelmet, + GetApparel: GetApparel, + GetAcc: GetAcc, + + //Detail + GetYGPDetail: GetYGPDetail, + GetYamalubeDetail: GetYamalubeDetail, + GetHelmetDetail: GetHelmetDetail, + GetApparelDetail: GetApparelDetail, + GetAccDetail: GetAccDetail, +}; diff --git a/api/others/transaction/transaction.js b/api/others/transaction/transaction.js new file mode 100644 index 0000000..e5f08ac --- /dev/null +++ b/api/others/transaction/transaction.js @@ -0,0 +1,288 @@ +import apollo from "@/lib/apollo.js"; + +async function getTransaction(token = "") { + var res = await apollo.query( + ` + query { + transactions{ + id + order_id + cust_name + cust_telp + cust_address + product_img{ + url + } + product_name + product_color + product_quantity + product_courier + product_price + } + }`, + token + ); + return res; +} + +async function getTransactionUnpaid(token = "") { + var res = await apollo.query( + ` + query { + transactions(where: { status: "1" }){ + id + order_id + cust_name + cust_telp + cust_address + product_img{ + url + } + product_name + product_color + product_quantity + product_courier + product_price + } + }`, + token + ); + return res; +} + +async function PayTransactionUnpaid(token = "") { + var res = await apollo.query( + ` + query{ + transactions(where: { status: "1" }){ + id + order_id + cust_name + cust_telp + cust_address + product_img{ + url + } + product_name + product_color + product_quantity + product_courier + product_price + } + } + `, + token + ); + return res; +} + +async function getTransactionPrepared(token = "") { + var res = await apollo.query( + ` + query { + transactions(where: { status: "2" }){ + id + order_id + cust_name + cust_telp + cust_address + product_img{ + url + } + product_name + product_color + product_quantity + product_courier + product_price + } + }`, + token + ); + return res; +} + +async function getTransactionSending(token = "") { + var res = await apollo.query( + ` + query { + transactions(where: { status: "3" }){ + id + order_id + cust_name + cust_telp + cust_address + product_img{ + url + } + product_name + product_color + product_quantity + product_courier + product_price + } + }`, + token + ); + return res; +} + +async function getTransactionFinished(token = "") { + var res = await apollo.query( + ` + query { + transactions(where: { status: "4" }){ + id + order_id + cust_name + cust_telp + cust_address + product_img{ + url + } + product_name + product_color + product_quantity + product_courier + product_price + } + }`, + token + ); + return res; +} + +async function AddToCart(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input : CartInput!){ + createCart( input:{data:$input} ) + { + cart{ + id + } + } + } + `, + token, + { + input: content, + } + ); + return res; +} + +async function AddToCheckout(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input: CheckoutInput!) { + createCheckout(input: { data: $input }) { + checkout { + id + } + } + } + + `, + token, + { + input: content, + } + ); + return res; +} + +async function newTransactionYamaha(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input : TransactionInput!){ + createTransaction( input:{data:$input} ) + { + transaction{ + id + } + } + } + `, + token, + { + input: content, + } + ); + return res; +} + +async function newTransactionSuzuki(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input : TransactionInput!){ + createTransaction( input:{data:$input} ) + { + transactionSuzuki{ + id + } + } + } + `, + token, + { + input: content, + } + ); + return res; +} + +async function newTransactionHonda(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input : TransactionInput!){ + createTransaction( input:{data:$input} ) + { + transactionHonda{ + id + } + } + } + `, + token, + { + input: content, + } + ); + return res; +} + +async function newTransactionHino(content, token = "") { + var res = await apollo.mutation( + ` + mutation($input : TransactionInput!){ + createTransaction( input:{data:$input} ) + { + transactionHino{ + id + } + } + } + `, + token, + { + input: content, + } + ); + return res; +} + +module.exports = { + newTransactionYamaha: newTransactionYamaha, + newTransactionSuzuki: newTransactionSuzuki, + newTransactionHonda: newTransactionHonda, + newTransactionHino: newTransactionHino, + getTransaction: getTransaction, + getTransactionUnpaid: getTransactionUnpaid, + PayTransactionUnpaid: PayTransactionUnpaid, + getTransactionPrepared: getTransactionPrepared, + getTransactionSending: getTransactionSending, + getTransactionFinished: getTransactionFinished, + + AddToCart: AddToCart, + AddToCheckout:AddToCheckout, +}; \ No newline at end of file diff --git a/api/subscription/subscription.js b/api/subscription/subscription.js new file mode 100644 index 0000000..cf7941e --- /dev/null +++ b/api/subscription/subscription.js @@ -0,0 +1,26 @@ +import apollo from "@/lib/apollo.js"; + +async function subscribe(email,token="") { + var res = await apollo.mutation( + ` + mutation($input: SubscriptionInput!){ + createSubscription(data:$input){ + data{ + id + } + } + } + `, + token, + { + input: { + Email:email, + publishedAt:new Date() + }, + } + ); + return res; +} + + +module.exports = {subscribe}; \ No newline at end of file diff --git a/components/Common/BlogPost.js b/components/Common/BlogPost.js new file mode 100644 index 0000000..fffe589 --- /dev/null +++ b/components/Common/BlogPost.js @@ -0,0 +1,123 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const BlogPost = () => { + return ( +
+
+
+

The News from Our Blog

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+
+ + + image + + + +
+ March 15, 2021 +
+
+ +
+

+ + The Security Risks of Changing Package Owners + +

+ + + By Admin + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse.

+ + + Read More + +
+
+
+ +
+
+
+ + + image + + + +
+ March 17, 2021 +
+
+ +
+

+ + Tips to Protecting Your Business and Family + +

+ + + By Smith + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse.

+ + + Read More + +
+
+
+ +
+
+
+ + + image + + + +
+ March 19, 2021 +
+
+ +
+

+ + Protect Your Workplace from Cyber Attacks + +

+ + + By John + + +

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse.

+ + + Read More + +
+
+
+
+
+
+ ) +} + +export default BlogPost; \ No newline at end of file diff --git a/components/Common/BlogPostStyleThree.js b/components/Common/BlogPostStyleThree.js new file mode 100644 index 0000000..cbf3d91 --- /dev/null +++ b/components/Common/BlogPostStyleThree.js @@ -0,0 +1,132 @@ +import React from 'react'; +import Link from 'next/link'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: true, + nav: false, + dots: true, + autoplayHoverPause: true, + autoplay: true, + smartSpeed: 1000, + autoplayTimeout: 5000, + margin: 30, + responsive: { + 0: { + items: 1, + }, + 768: { + items: 2, + }, + 992: { + items: 3, + } + } +}; + +const BlogPostStyleThree = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+
+

Our Recent News

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ + {display ? +
+
+ + image + +
+ +
+
    +
  • By Admin
  • +
  • 20 February 2020
  • +
+

+ + The security risks of changing package owners + +

+
+
+ +
+
+ + image + +
+ +
+
    +
  • By Admin
  • +
  • 21 February 2020
  • +
+

+ + Tips to Protecting Your Business and Family + +

+
+
+ +
+
+ + image + +
+ +
+
    +
  • By Admin
  • +
  • 22 February 2020
  • +
+

+ + Protect Your Workplace from Cyber Attacks + +

+
+
+ +
+
+ + image + +
+ +
+
    +
  • By Admin
  • +
  • 22 February 2020
  • +
+

+ + Four New WordPress.com Color Schemes + +

+
+
+
: ''} +
+
+ ) +} + +export default BlogPostStyleThree; \ No newline at end of file diff --git a/components/Common/BlogPostStyleTwo.js b/components/Common/BlogPostStyleTwo.js new file mode 100644 index 0000000..8286a1e --- /dev/null +++ b/components/Common/BlogPostStyleTwo.js @@ -0,0 +1,140 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const BlogPostStyleTwo = () => { + return ( +
+
+
+ News +

The News from Our Blog

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+
+ + + image + + +
+ +
+
    +
  • + Admin +
  • +
  • August 15, 2021
  • +
+ +

+ + The security risks of changing package owners + +

+ + + + Read More + + +
+
+
+ +
+
+
+ + + image + + +
+ +
+
    +
  • + Admin +
  • +
  • August 15, 2021
  • +
+ +

+ + Tips to Protecting Your Business and Family + +

+ + + + Read More + + +
+
+
+ +
+
+
+ + + image + + +
+ +
+
    +
  • + Admin +
  • +
  • August 15, 2021
  • +
+

+ + Protect Your Workplace from Cyber Attacks + +

+ + + + Read More + + +
+
+
+
+
+ + {/* Shape Images */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ); +} + +export default BlogPostStyleTwo; \ No newline at end of file diff --git a/components/Common/CTA.js b/components/Common/CTA.js new file mode 100644 index 0000000..141e612 --- /dev/null +++ b/components/Common/CTA.js @@ -0,0 +1,35 @@ +import React from 'react'; +import Link from 'next/link'; + +const CTA = () => { + return ( +
+
+
+
+
+

Sign up for web hosting today!

+
+
+ +
+
+
+ Starting at only +

$4.75/mo*

+
+ +
+ + Get Started + +
+
+
+
+
+
+ ); +} + +export default CTA; diff --git a/components/Common/CTAStyleTwo.js b/components/Common/CTAStyleTwo.js new file mode 100644 index 0000000..70f87bc --- /dev/null +++ b/components/Common/CTAStyleTwo.js @@ -0,0 +1,20 @@ +import React from 'react'; +import Link from 'next/link'; + +const CTAStyleTwo = () => { + return ( +
+
+
+

Do you have any projects?

+ + + Contact Us + +
+
+
+ ); +} + +export default CTAStyleTwo; \ No newline at end of file diff --git a/components/Common/Feedback.js b/components/Common/Feedback.js new file mode 100644 index 0000000..de4aa56 --- /dev/null +++ b/components/Common/Feedback.js @@ -0,0 +1,228 @@ +import React from 'react'; +import Slider from "react-slick"; +import * as Icon from 'react-feather'; + +const NextArrow = (props) => { + const { onClick } = props; + return ( + + ); +} + +const PrevArrow = (props) => { + const { onClick } = props; + return ( + + ); +} + +class Feedback extends React.Component { + state = { + imagesSlider: null, + thumbnailsSlider: null, + oldSlide: 0, + activeSlide: 0, + activeSlide2: 0 + }; + + componentDidMount() { + this.setState({ + imagesSlider: this.slider1, + thumbnailsSlider: this.slider2 + }); + } + + renderSliderFullContent = () => { + return DEFAULT_PROPS.map(({name,profession,image,content}) => { + return ( +
+
+
+
+ image +
+ +

{name}

+ {profession} +

{content}

+
+
+
+ ) + }) + } + + renderSliderImages = () => { + return DEFAULT_PROPS.map(({name, image}) => { + return ( +
+
+
+ client +
+
+
+ ) + }) + } + + render() { + const sliderSettings1 = { + speed: 100, + slidesToShow: 1, + slidesToScroll: 1, + cssEase: 'linear', + fade: true, + autoplay: true, + draggable: true, + asNavFor: this.state.thumbnailsSlider, + draggable: false, + arrows: false, + nextArrow: false, + prevArrow: false + } + + const sliderSettings2 = { + speed: 300, + slidesToShow: 5, + slidesToScroll: 1, + cssEase: 'linear', + autoplay: true, + centerMode: true, + draggable: false, + focusOnSelect: true, + asNavFor: this.state.imagesSlider, + nextArrow: , + prevArrow: , + beforeChange: (current, next) => this.setState({ oldSlide: current, activeSlide: next }), + afterChange: current => this.setState({ activeSlide2: current }) + } + + return ( +
+
+
+

What users Saying

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+ (this.slider1 = slider)} + {...sliderSettings1} + > + { + this.renderSliderFullContent() + } + +
+
+ +
+
+ (this.slider2 = slider)} + {...sliderSettings2} + > + { + this.renderSliderImages() + } + +
+
+ +
+ +
+ +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ); + } +} + +const DEFAULT_PROPS = [ + { + name: 'David Gale', + profession: 'Web Developer', + image: '/images/client-image/client2.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Matt Damon', + profession: 'Software Engineer', + image: '/images/client-image/client4.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Nicky Parsons', + profession: 'Fictional Character', + image: '/images/client-image/client1.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Jason Momoa', + profession: 'American Actor', + image: '/images/client-image/client5.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Gennady Korotkevich', + profession: 'Sport Programmer', + image: '/images/client-image/client3.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Petr Mitrichev', + profession: 'Russian Programmer', + image: '/images/client-image/client3.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Reid W. Barton', + profession: 'Mathematics', + image: '/images/client-image/client2.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Lisa Sauermann', + profession: 'Mathematician', + image: '/images/client-image/client1.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + } +]; + +export default Feedback; diff --git a/components/Common/FeedbackStyleFive.js b/components/Common/FeedbackStyleFive.js new file mode 100644 index 0000000..b48e524 --- /dev/null +++ b/components/Common/FeedbackStyleFive.js @@ -0,0 +1,50 @@ +import React from 'react'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: false, + nav: false, + smartSpeed: 1000, + autoplayTimeout: 5000, + dots: true, + autoplayHoverPause: true, + autoplay: true, + items: 1, +}; + +const FeedbackStyleFive = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+ {display ? +
+ image +

Pellentesque sed purus eu urna vulputate interdum quis sit amet sapien. Pellentesque porta mauris at orci sagittis commodo. Curabitur aliquam nibh odio, vel ornare nisl volutpat quis. Maecenas congue dapibus lacus id fringilla. Vestibulum id augue massa. Proin sed neque dapibus, vulputate ligula eget, aliquam eros.

+
+ +
+ image +

Pellentesque sed purus eu urna vulputate interdum quis sit amet sapien. Pellentesque porta mauris at orci sagittis commodo. Curabitur aliquam nibh odio, vel ornare nisl volutpat quis. Maecenas congue dapibus lacus id fringilla. Vestibulum id augue massa. Proin sed neque dapibus, vulputate ligula eget, aliquam eros.

+
+ +
+ image +

Pellentesque sed purus eu urna vulputate interdum quis sit amet sapien. Pellentesque porta mauris at orci sagittis commodo. Curabitur aliquam nibh odio, vel ornare nisl volutpat quis. Maecenas congue dapibus lacus id fringilla. Vestibulum id augue massa. Proin sed neque dapibus, vulputate ligula eget, aliquam eros.

+
+
: ''} +
+
+ ) +} + +export default FeedbackStyleFive; \ No newline at end of file diff --git a/components/Common/FeedbackStyleFour.js b/components/Common/FeedbackStyleFour.js new file mode 100644 index 0000000..adfe210 --- /dev/null +++ b/components/Common/FeedbackStyleFour.js @@ -0,0 +1,112 @@ +import React from 'react'; +import OwlCarousel from 'react-owl-carousel3'; +import * as Icon from 'react-feather'; + +const options = { + loop: false, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + autoplayTimeout: 5000, + items: 1, + animateOut: 'fadeOut', +} + +const FeedbackStyleFour = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+
+

Our Clients Feedback

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ + {display ? +
+
+ image +

Sarah Taylor

+ CEO at Envato +
+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aliquid ullam harum sit. Accusantium veritatis dolore ducimus illum, cumque excepturi, autem rerum illo amet placeat odit corporis!

+ +
+ + + + + +
+
+ +
+
+ image +

Steven Smith

+ CEO at Envato +
+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aliquid ullam harum sit. Accusantium veritatis dolore ducimus illum, cumque excepturi, autem rerum illo amet placeat odit corporis!

+ +
+ + + + + +
+
+ +
+
+ image +

James Eva

+ CEO at Envato +
+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aliquid ullam harum sit. Accusantium veritatis dolore ducimus illum, cumque excepturi, autem rerum illo amet placeat odit corporis!

+ +
+ + + + + +
+
+
: ''} +
+ + {/* Shape Images */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ); +} + +export default FeedbackStyleFour; \ No newline at end of file diff --git a/components/Common/FeedbackStyleThree.js b/components/Common/FeedbackStyleThree.js new file mode 100644 index 0000000..9892bf2 --- /dev/null +++ b/components/Common/FeedbackStyleThree.js @@ -0,0 +1,120 @@ +import React from 'react'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); +import * as Icon from 'react-feather'; + +const options = { + loop: false, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + autoplayTimeout: 5000, + items: 1, + animateOut: 'fadeOut', +} + +const FeedbackStyleThree = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+
+ Testimonials +

Our Clients Feedback

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ + {display ? +
+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aliquid ullam harum sit. Accusantium veritatis dolore ducimus illum, cumque excepturi, autem rerum illo amet placeat odit corporis!

+ +
+ image + +
+ + + + + +
+ +

Sarah Taylor

+ CEO at Envato +
+
+ +
+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aliquid ullam harum sit. Accusantium veritatis dolore ducimus illum, cumque excepturi, autem rerum illo amet placeat odit corporis!

+ +
+ image + +
+ + + + + +
+ +

Steven Smith

+ CEO at Envato +
+
+ +
+

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aliquid ullam harum sit. Accusantium veritatis dolore ducimus illum, cumque excepturi, autem rerum illo amet placeat odit corporis!

+ +
+ image + +
+ + + + + +
+ +

James Eva

+ CEO at Envato +
+
+
: ''} +
+ + {/* Shape Images */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ); +} + +export default FeedbackStyleThree; \ No newline at end of file diff --git a/components/Common/FeedbackStyleTwo.js b/components/Common/FeedbackStyleTwo.js new file mode 100644 index 0000000..4020afd --- /dev/null +++ b/components/Common/FeedbackStyleTwo.js @@ -0,0 +1,116 @@ +import React from 'react'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: false, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + autoplayTimeout: 5000, + items: 1, +} + +const FeedbackStyleTwo = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + return ( +
+
+
+

What users Saying

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ + {display ? +
+
+
+ image +
+ +
+

Steve Lucy

+ Lead Developer at Envato +
+
+ +

Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+ image +
+ +
+

David Luiz

+ Lead Developer at Envato +
+
+ +

Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+ image +
+ +
+

Marta Smith

+ Lead Developer at Envato +
+
+ +

Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+
: ''} +
+ + {/* Shape Images */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ); +} + +export default FeedbackStyleTwo; diff --git a/components/Common/FunFactsArea.js b/components/Common/FunFactsArea.js new file mode 100644 index 0000000..0288959 --- /dev/null +++ b/components/Common/FunFactsArea.js @@ -0,0 +1,61 @@ +import React from 'react'; +import Link from 'next/link'; + +const FunFactsArea = () => { + return ( +
+
+
+

We always try to understand users expectation

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+

180K

+

Downloaded

+
+
+ +
+
+

20K

+

Feedback

+
+
+ +
+
+

500+

+

Workers

+
+
+ +
+
+

70+

+

Contributors

+
+
+
+ +
+

Have any question about us?

+

Don't hesitate to contact us

+ + + Contact Us + +
+ +
+ map +
+
+
+ ) +} + +export default FunFactsArea; \ No newline at end of file diff --git a/components/Common/Newsletter.js b/components/Common/Newsletter.js new file mode 100644 index 0000000..4b9885d --- /dev/null +++ b/components/Common/Newsletter.js @@ -0,0 +1,46 @@ +import React from 'react'; + +const Newsletter = () => { + return ( +
+
+
+
+
+ image +
+
+ +
+
+

Start your free trial

+ +
+ + +
+ +

Test out the Machine Learning features for 14 days, no credit card required.

+
+
+
+
+ + {/* Shape Images */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ); +} + +export default Newsletter; \ No newline at end of file diff --git a/components/Common/NewsletterStyleTwo.js b/components/Common/NewsletterStyleTwo.js new file mode 100644 index 0000000..4483394 --- /dev/null +++ b/components/Common/NewsletterStyleTwo.js @@ -0,0 +1,32 @@ +import React from 'react'; + +const NewsletterStyleTwo = () => { + return ( +
+
+
+
+
+ image +
+
+ +
+
+

Start your free trial

+ +
+ + +
+ +

Test out the Big Data Analytics features for 14 days, no credit card required.

+
+
+
+
+
+ ) +} + +export default NewsletterStyleTwo; \ No newline at end of file diff --git a/components/Common/PageBanner.js b/components/Common/PageBanner.js new file mode 100644 index 0000000..66fcb97 --- /dev/null +++ b/components/Common/PageBanner.js @@ -0,0 +1,43 @@ +import React from 'react'; + +const PageBanner = ({pageTitle}) => { + return ( +
+
+
+
+

{pageTitle}

+
+
+
+ + {/* Shape Images */} + {/*
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
*/} +
+ ); +} + +export default PageBanner; \ No newline at end of file diff --git a/components/Common/Partner.js b/components/Common/Partner.js new file mode 100644 index 0000000..8d7e59c --- /dev/null +++ b/components/Common/Partner.js @@ -0,0 +1,200 @@ +import React from 'react' +import Link from 'next/link' + +const Partner = () => { + return ( + <> +
+
+

Ready to talk?

+

Our team is here to answer your question about StartP

+ + + Contact Us + + + + + Or, get started now with a free trial + + +
+
+ +
+
+
More that 1.5 million businesses and organizations use StartP
+ +
+
+
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+ +
+ + + partner + partner + + +
+
+
+
+
+ + ) + +} + +export default Partner; \ No newline at end of file diff --git a/components/Common/PartnerStyleTwo.js b/components/Common/PartnerStyleTwo.js new file mode 100644 index 0000000..40a9b1c --- /dev/null +++ b/components/Common/PartnerStyleTwo.js @@ -0,0 +1,93 @@ +import React from 'react'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: true, + nav: false, + dots: false, + autoplay: true, + smartSpeed: 1000, + autoplayTimeout: 5000, + responsive: { + 0:{ + items:2, + }, + 768:{ + items:4, + }, + 1200:{ + items:6, + } + } +} + +const PartnerStyleTwo = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+ {display ? + + + + + + + + + + + + + + : ''} +
+
+ ); +} + +export default PartnerStyleTwo; diff --git a/components/Common/RecentWorks.js b/components/Common/RecentWorks.js new file mode 100644 index 0000000..9587bfa --- /dev/null +++ b/components/Common/RecentWorks.js @@ -0,0 +1,152 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + items: 4, + loop: true, + nav: false, + autoplay: true, + margin:30, + dots: false, + responsive: { + 0: { + items: 1 + }, + 768: { + items: 2 + }, + 1200: { + items: 3 + }, + 1500: { + items: 4 + } + } +} + +const RecentWorks = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+
+

Our Recent Works

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+
+ + {display ? +
+ image + + + + + +
+

+ + Incredible infrastructure + +

+

Lorem ipsum dolor amet, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

+
+
+ +
+ image + + + + + +
+

+ + Email Notifications + +

+

Lorem ipsum dolor amet, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

+
+
+ +
+ image + + + + + +
+

+ + Best Analytics Audits + +

+

Lorem ipsum dolor amet, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

+
+
+ +
+ image + + + + + +
+

+ + Simple Dashboard + +

+

Lorem ipsum dolor amet, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

+
+
+ +
+ image + + + + + +
+

+ Information Retrieval +

+

Lorem ipsum dolor amet, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

+
+
+
: ''} + + {/* Shape Images */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ ) +} + +export default RecentWorks; diff --git a/components/Common/Team.js b/components/Common/Team.js new file mode 100644 index 0000000..b05403f --- /dev/null +++ b/components/Common/Team.js @@ -0,0 +1,446 @@ +import React from 'react'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); +import * as Icon from 'react-feather'; +import Link from 'next/link' + +const options = { + items: 5, + loop: true, + nav: false, + dots: true, + margin: 30, + autoplay: false, + smartSpeed: 1000, + responsive: { + 0: { + items: 1 + }, + 768: { + items: 2 + }, + 1200: { + items: 4 + }, + 1500: { + items: 5 + } + } +} + +const Team = () => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( +
+
+
+

Our Awesome Team

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+
+ + {display ? +
+
+ image +
+ +
+
+

Josh Buttler

+ CEO & Founder +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Alex Maxwel

+ Marketing Manager +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Janny Cotller

+ Web Developer +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Jason Statham

+ UX/UI Designer +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Corey Anderson

+ Project Manager +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Josh Buttler

+ CEO & Founder +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Alex Maxwel

+ Marketing Manager +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Janny Cotller

+ Web Developer +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Jason Statham

+ UX/UI Designer +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+ +
+
+ image +
+ +
+
+

Corey Anderson

+ Project Manager +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+
: ''} +
+ ) +} + +export default Team; \ No newline at end of file diff --git a/components/Common/TeamStyleTwo.js b/components/Common/TeamStyleTwo.js new file mode 100644 index 0000000..6618699 --- /dev/null +++ b/components/Common/TeamStyleTwo.js @@ -0,0 +1,185 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const TeamStyleTwo = () => { + return ( +
+
+
+

Thamrin Group Founders

+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+ +
+
+
+
+ image +
+ +
+
+

Josh Buttler

+ CEO & Founder +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+
+ +
+
+
+ image +
+ +
+
+

Alex Maxwel

+ CEO & Founder +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+
+ +
+
+
+ image +
+ +
+
+

Janny Cotller

+ CEO & Founder +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+
+ +
+
+
+ image +
+ +
+
+

Jason Statham

+ CEO & Founder +
+ +
    +
  • + + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
  • + + + +
  • +
+ +

Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

+
+
+
+
+
+
+ ) +} + +export default TeamStyleTwo; \ No newline at end of file diff --git a/components/Common/new/Gallery.js b/components/Common/new/Gallery.js new file mode 100644 index 0000000..ac298f7 --- /dev/null +++ b/components/Common/new/Gallery.js @@ -0,0 +1,229 @@ +// import React, { Component } from 'react'; +// import Masonry from 'react-masonry-component'; +// import Link from 'next/link'; + +// const masonryOptions = { +// transitionDuration: 0 +// }; + +// export class Projects extends Component { +// render() { +// const images = this.props.images.map((image, idx) => { +// return ( +//
+//
+// portfolio-image + +//
+// {image.category} +//

{image.title}

+//
+ +// +// +// +//
+//
+// ) +// }) +// return ( +//
+//
+//
+//

Our Latest Projects

+//

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+//
+ +// +// {images} +// +//
+//
+// ); +// } +// } + +// Projects.defaultProps = { +// images: [ +// { +// image: "/images/Home/gallery/1.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/2.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/3.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/4.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/5.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/6.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/7.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/8.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/9.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// ] +// } + +// export default Projects; + +import React from 'react'; +import Link from 'next/link'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: true, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + margin: 30, + autoplayTimeout: 5000, + responsive: { + 0:{ + items: 1, + }, + 576:{ + items: 2, + }, + 768:{ + items: 2, + }, + 1024:{ + items: 3, + }, + 1200:{ + items: 4, + } + }, +} + +const Projects = ({galleries,title}) => { + + const images = (galleries)?galleries.map((data, index) => { + return ( +
+ image +
+ ); + }):''; + + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return (galleries&&galleries.length>0)?( + + ):""; +} + +export default Projects; \ No newline at end of file diff --git a/components/Common/new/MainBanner.js b/components/Common/new/MainBanner.js new file mode 100644 index 0000000..0774acb --- /dev/null +++ b/components/Common/new/MainBanner.js @@ -0,0 +1,104 @@ +import React from 'react'; +import { Link as LinkScroll } from 'react-scroll' +import Link from 'next/link'; +import dynamic from 'next/dynamic'; + + + + +const MainBanner = ({company,main_banner,link_to,banner,className}) => { + var defaultValue; + if(company == 'thamrin'){ + defaultValue = { + Title:"Selamat Datang di Thamrin Group", + Description:"Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti.", + Image:'/images/bigdata-analytics/main-banner.jpg' + } + } + else if(company == 'yamaha'){ + defaultValue = { + Title:"Exclusif Motor Untuk Anda", + Description:"PT.Thamrin Brother's Yamaha merupakan sebuah bisnis company dari Thamrin Group yang bergerak dalam bidang penjualan produk Motor dan Sparepart Yamaha.", + Image:'/images/Yamaha/banner.jpg' + } + } + else{ + defaultValue = { + Title:"Exclusif Motor Untuk Anda", + Description:"", + Image:'/images/Yamaha/banner.jpg' + } + } + const Main_Banner = (main_banner && main_banner.length > 0 && main_banner[0].attributes.Contents.data&&main_banner[0].attributes.Contents.data.length>0)?( +
+
+

{main_banner[0].attributes.Contents.data[0].attributes.Title}

+

{main_banner[0].attributes.Contents.data[0].attributes.Description}

+ {(main_banner[0].attributes.Contents.data[0].attributes.Link) + ?( + Get Started + ) + :( + Get Started + ) + } +
+
+ ):( +
+
+

{defaultValue.Title}

+

{defaultValue.Description}

+ + Get Started + +
+
+ ); + const Banners = (banner && banner.length >0)?banner.map((data,idx)=>{ + return ( + // +
+ {/*
+

{data.attributes.Title}

+
*/} +
+ // + ); + }):""; + const OwlCarousel = dynamic(import('react-owl-carousel3')); + const options = { + center:false, + loop: false, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + margin: 0, + autoplayTimeout: 5000, + autoWidth:false, + responsive: { + 0:{ + items: 1, + }, + }, + } + return ( +
+ + {Main_Banner} + {Banners} + +
+ ) +} + +export default MainBanner; \ No newline at end of file diff --git a/components/Common/new/NewsDetail.js b/components/Common/new/NewsDetail.js new file mode 100644 index 0000000..a6d8e42 --- /dev/null +++ b/components/Common/new/NewsDetail.js @@ -0,0 +1,255 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; +import util from '../../../lib/util'; + + +const NewsDetails = ({news,navigation,id}) => { + const nav = navigation.map((i,idx)=>{ + if(navigation.length > 1){ + if(i.id>id){ + return(
+
+ + + + image + Show + + + {i.title||"Other News"} + + {new Date(i.publishedAt).toLocaleDateString('ID',{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })} + + + + + +
+
); + } + else if(i.id +
+ + + + {i.title||"Other News"} + + {new Date(i.publishedAt).toLocaleDateString('ID',{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })} + + + + image + Show + + + +
+ + ); + } + else return ""; + } + else{ + + return(
+
+ + + + image + Show + + + {i.title||"Other News"} + + {new Date(i.publishedAt).toLocaleDateString('ID',{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })} + + + + + +
+
); + } + }); + return ( + <> + {/* */} +
+
+
+
+
+
+
+ image +
+
+
+
    +
  • + {new Date(news.publishedAt).toLocaleDateString('ID',{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })} +
  • +
+
+ +

{news.Title}

+

+ {util.htmlParse(news.Description||'')} +

+
+ {(navigation.length>0)?( +
+ {nav} +
+ ):"" + } + +
+
+
+
+
+ {/*
+
+
+

{news.Title}

+ +
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+
+
+
+
+ + + image + + +
+ +
+
+
    +
  • Admin
  • +
  • August 15, 2021
  • +
+
+ +

+ + Making Peace With The Feast Or Famine Of Freelancing + +

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

+ + + + Read Story + + +
+
+
+ +
+
+
+ + image + +
+ +
+
+
    +
  • Admin
  • +
  • August 18, 2021
  • +
+
+ +

+ + I Used The Web For A Day On A 50 MB Budget + +

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

+ + + + Read Story + + +
+
+
+ +
+
+
+ + image + +
+ +
+
+
    +
  • Admin
  • +
  • August 15, 2021
  • +
+
+ +

+ + Here are the 5 most telling signs of micromanagement + +

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

+ + + + Read Story + + +
+
+
+
+
+ */} +
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+
+ shape +
+ {/*
*/} + + + ) +} + +export default NewsDetails; \ No newline at end of file diff --git a/components/Common/new/NewsList.js b/components/Common/new/NewsList.js new file mode 100644 index 0000000..96ae3f1 --- /dev/null +++ b/components/Common/new/NewsList.js @@ -0,0 +1,111 @@ +import Link from "next/link"; +import * as Icon from 'react-feather'; + + +const NewsList = ({company,news,pages,current})=>{ + if(news&&news.length>0){ + const pagination = ()=>{ + var paging = []; + for(var i=1;i<=pages;i++){ + paging.push( +
  • + + {i} +
  • + ); + } + return paging; + }; + const listNews = news.map((data,idx)=>{ + return( +
    +
    +
    + + + image + + + +
    + {new Date(data.attributes.publishedAt).toLocaleDateString('ID',{ weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' })} +
    +
    + +
    +

    + + {data.attributes.Title} + +

    + + {/* By Admin */} +
    + + + Read More + + +
    +
    +
    ); + }); + return( +
    +
    +
    + {listNews} + {/* Pagination */} +
    +
    + +
    +
    +
    +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ); + } + else{ + return ( +
    +
    Belum ada berita untuk saat ini. Tunggu berita selanjutnya dari kami ya!
    +
    + ); + } + + +}; + +export default NewsList; \ No newline at end of file diff --git a/components/Common/new/ProductDetails.js b/components/Common/new/ProductDetails.js new file mode 100644 index 0000000..99b72e1 --- /dev/null +++ b/components/Common/new/ProductDetails.js @@ -0,0 +1,417 @@ +import React, { useState } from 'react' + +//component +import PageBanner from '@/components/Common/PageBanner'; +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useRouter } from 'next/router' +import { useToasts } from 'react-toast-notifications' + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +import dynamic from 'next/dynamic' +const OwlCarousel = dynamic(import('react-owl-carousel3')) + +//library yarn +import NumberFormat from 'react-number-format'; +import util from '../../../lib/util'; + +//sweet alert +import swal from 'sweetalert'; + +const options = { + loop: true, + nav: true, + dots: false, + autoplay: true, + items: 1, + smartSpeed: 1000, + autoplayTimeout: 5000, + navText: [ + "", + "" + ], +}; + +const ProductDetails = function ({ detailproduct, backend, user, ...props }) { + const [formValue, setFormValue] = React.useState({ + product_img: "", + product_name: "", + product_color: "", + product_price: "", + product_parts:"", + }); + + const [OTRProduct, setProductOTR] = useState((detailproduct.Product_prices.data&&detailproduct.Product_prices.data.length==1)?detailproduct.Product_prices.data[0].attributes.Price:''); + + const router = useRouter(); + const [displayOwl, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( + <> + +
    +
    +
    +
    + {(displayOwl)? + {(detailproduct.Image.data)?detailproduct.Image.data.map((option,idx) => ( + + )):''} + + :''} +
    + +
    +
    +

    + {detailproduct.Name} +

    +
    +
    + +
    + {/*

    + +

    +
    +
    + + +
    +
    */} + + {/*

    {this.state.selectedOption}

    */} + + {/*
      +
    • +
    • +
    • +
    • +
    • +
    */} + + {/*
    + Availability: {detailproduct.Stock} +
    */} +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + product_name: detailproduct.Name, + // product_img: detailproduct[0].backend.img[0], + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/AddToCart", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["cart"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + router.push("/yamaha/Shop/Cart"); + } + else { + swal("Produk Gagal Ditambah ke Keranjang", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + > + { + (detailproduct.Product_prices.data&&detailproduct.Product_prices.data.length>0) + ?( + <> +
    + + +
    + +
    + + ) + :"" + } + + { + (detailproduct.Product_parts.data&&detailproduct.Product_parts.data.length>0) + ?( + <> +
    + +
    + +
    + + ) + :"" + } + + { + (detailproduct.Product_colors.data&&detailproduct.Product_colors.data.length>0) + ?( + <> +
    + +
    + {detailproduct.Product_colors.data.map((option,idx) => ( + {option.attributes.Color}{(idx==detailproduct.Product_colors.data.length-1)?'':','} + ))} + + ) + :"" + } + + {/* +
    + +
    */} + +
    + + {/* */} +{/* + + + */} +
    + + {/*
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    */} + + {/*
    + Share: + + +
    */} +
    +
    + +
    +
    + + + Deskripsi + {/* Info Penting */} + { + (detailproduct.Category.data && detailproduct.Category.data.attributes.Name == "Unit") + ? Spesifikasi + : "" + } + {/* Review */} + + + +
    +

    {util.htmlParse(detailproduct.Description)}

    +
    +
    + + {/* +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    */} + + +
    +
      +

      Spesifikasi Mesin

      + {util.htmlParse(detailproduct.Machine)}

      + +

      Spesifikasi Dimensi

      + {util.htmlParse(detailproduct.Dimension)}

      + +

      Spesifikasi Rangka

      + {util.htmlParse(detailproduct.Structure)}

      + +

      Spesifikasi Kelistrikan

      + {util.htmlParse(detailproduct.Voltage)}

      +
    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    +
    + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Common/new/Sales.js b/components/Common/new/Sales.js new file mode 100644 index 0000000..ae33ffd --- /dev/null +++ b/components/Common/new/Sales.js @@ -0,0 +1,79 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const Sales = function ({ company, sales, ...props }) { + + const DataSales = sales.map((data) => { + return ( +
    +
    + image + +
    +
    + {(data.Name)?(data.Name.length>20)?data.Name.substring(0,20):data.Name:''}
    + Sales Consultant +
    +
      +
    • +
      {data.Telp}
      +
    • +
    +
      +
    • + +
    • +
    • + + +
    • +
    + {/*
      +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    */} +

    + + Details + +
    +
    +
    + ) + }) + return ( +
    +
    +
    +

    Mercedes Benz Sales

    +
    +
    + +
    + {DataSales} +
    +
    +
    + ) +} + +export default Sales; \ No newline at end of file diff --git a/components/Common/new/Sales_Detail.js b/components/Common/new/Sales_Detail.js new file mode 100644 index 0000000..3f8c00f --- /dev/null +++ b/components/Common/new/Sales_Detail.js @@ -0,0 +1,90 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +import { FaWhatsapp } from "react-icons/fa"; +import { FaRegEnvelope } from "react-icons/fa"; +import { FaPhoneAlt } from "react-icons/fa"; + +const Sales = function ({ sales, ...props }) { + return ( +
    + + + + + +
    +
    + image + +
    +

    {sales.Name}

    +

    Sales Consultant

    +
    +
    +
    + + CALL US + + + EMAIL US + + + WA US + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + {sales.Telp}
    Mobile
    +
    + + + + {sales.Email}
    Email
    +
    + + + + {sales.Company.data?sales.Company.data.attributes.Name:''}
    Sales Consultant
    +
    + + + + {(sales.Company.data?sales.Company.data.attributes.Website:'thamrin.mercedes-benz.co.id')}
    Website
    +
    +
    + +
    + ) +} + +export default Sales; \ No newline at end of file diff --git a/components/Common/new/SparepartList.js b/components/Common/new/SparepartList.js new file mode 100644 index 0000000..57d345d --- /dev/null +++ b/components/Common/new/SparepartList.js @@ -0,0 +1,236 @@ +import React from 'react' +import * as Icon from 'react-feather' +import { useSelector } from 'react-redux' +import Select from 'react-select'; +import Router from 'next/router'; +import Link from 'next/link'; + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +//yarn library +import NumberFormat from 'react-number-format'; + +const SparepartList = function ({ company,category,page,selected,products, ...props }) { + // const handleName = values => { + // Router.push({ + // pathname: '/${company}/product/Sparepart?c='+(company||''), + // query: (values && values.length != 0) ? { filter: values["name"] } : {}, + // }) + // } + + category = category.map((i)=>i.replace(' ','_')); + const pagination = (type,pages)=>{ + var paging = []; + var current = (selected==type)?page:1; + for(var i=1;i<=pages;i++){ + paging.push( +
  • + {i} +
  • + ); + } + + return ( +
    +
    +
    + +
    +
    +
    + ); + }; + + const productGrid = function(product){ + if(product){ + return product.map((data) => { + return ( +
    +
    + + +
    +

    + + {data.attributes.Name} + +

    + + 0?data.attributes.Product_prices.data[0].attributes.Price:0 *( 1- data.discount)} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> +
    + + +
    +
    + + 0?data.attributes.Product_prices.data[0].attributes.Price:0} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> +
    +
    +
    + + + Detail Product + +
    +
    +
    + ); + }); + } + else return( +
    +
    Belum ada produk untuk saat ini. Tunggu berita selanjutnya dari kami ya!
    +
    ); + } + + return ( +
    +
    +
    +
    + + {/*
    + i.id == selected) : null} + getOptionLabel={option => `${option.name}`} + getOptionValue={option => option.id} + options={product} + isClearable="true" + instanceId="name" + placeholder="Cari Produk" + onChange={values => handleName(values)} + /> */} +
    +
    +
    + +
    + + {Product} + + {/* Pagination */} +
    +
    + +
    +
    +
    +
    +
    + ) + } + else{ + return ( +
    +
    Belum ada produk yang terdaftar untuk saat ini. Tunggu berita selanjutnya dari kami ya!
    +
    + ); + } +} + +export default ProductCards; \ No newline at end of file diff --git a/components/Company/AboutUs/AboutUs.js b/components/Company/AboutUs/AboutUs.js new file mode 100644 index 0000000..577386f --- /dev/null +++ b/components/Company/AboutUs/AboutUs.js @@ -0,0 +1,68 @@ +import React from 'react'; +import Partner from "@/components/Common/Partner"; +import Link from 'next/link'; +import util from '../../../lib/util'; + +const About1 = ({info,company,img}) => { + return ( + <> +
    +
    +
    +
    +
    + image +
    +
    + +
    +
    +
    +

    Tentang Kami

    +

    {util.htmlParse(info)||

    }

    +
    +
    +

    Visi

    +

    {util.htmlParse(company.Visi)||

    }

    +
    +
    +

    Misi

    + + {/* {util.htmlParse(misi)} */} + {util.htmlParse(company.Misi)||
    } + {/*

    + 1. Melayani 21,7 juta pelanggan di tahun 2022 +


    +

    + 2. Mengembangkan pemimpin yang sukses +


    +

    + 3. Mengelola proses administrasi yang simple & excellent +


    +

    + 4. Mendukung continuous improvement +


    */} +
    +
    +
    +
    +
    +
    + +
    +
    +

    +

    Ingin Info Lebih Lanjut ?

    +

    Tanyakan Kepada Pihak Kami Untuk Info Lebih Lanjutnya

    + + + Contact Us + + +
    +
    + + ) +} + +export default About1; \ No newline at end of file diff --git a/components/Company/ContactUs/ContactUs.js b/components/Company/ContactUs/ContactUs.js new file mode 100644 index 0000000..7a0c8df --- /dev/null +++ b/components/Company/ContactUs/ContactUs.js @@ -0,0 +1,40 @@ +import React from 'react'; +import * as Icon from 'react-feather'; + +const ContactInfo = ({mail,phone}) => { + return ( +
    +
    +
    +
    +
    +
    +
    + +
    +

    Mail Here

    +

    thamrin@gmail.co.id

    +
    +
    + +
    +
    +
    + +
    +

    Call Here

    +

    0711-322424

    +
    +
    +
    +
    +
    + + + + +
    + ) +} + +export default ContactInfo; \ No newline at end of file diff --git a/components/Company/Footer.js b/components/Company/Footer.js new file mode 100644 index 0000000..1ad3a86 --- /dev/null +++ b/components/Company/Footer.js @@ -0,0 +1,165 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const Footer = ({company,social,icon,desc}) => { + company = company||{}; + const currentYear = new Date().getFullYear(); + const Socials = (social)?social.map((data,idx)=>{ + return( +
  • + + { + (data.attributes.Type =='Facebook') + ?() + :(data.attributes.Type =='Instagram') + ?() + :(data.attributes.Type =='Twitter') + ?() + :(data.attributes.Type =='Youtube') + ?():"" + } + +
  • + ); + }):""; + + return ( + + ) + +} + +export default Footer; \ No newline at end of file diff --git a/components/Company/Header.js b/components/Company/Header.js new file mode 100644 index 0000000..a90365c --- /dev/null +++ b/components/Company/Header.js @@ -0,0 +1,250 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +export default function NavbarYamaha({ company,icon,username, ...props }) { + const [menu, setMenu] = React.useState(true) + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + return ( + + ); +} \ No newline at end of file diff --git a/components/Company/Home/Dealer.js b/components/Company/Home/Dealer.js new file mode 100644 index 0000000..30c0c19 --- /dev/null +++ b/components/Company/Home/Dealer.js @@ -0,0 +1,56 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const Dealers = function ({ title,backend, dealers, ...props }) { + const ListDealer = (dealers)?dealers.map((data,idx) => { + try{ + if(data.attributes.Gmap && data.attributes.Gmap[0]=='<'){ + var span = document.createElement('span'); + span.innerHTML = data.attributes.Gmap; + data.attributes.Gmap = span.textContent || span.innerText; + } + } + catch(e){ + + } + return ( +
    +
    + image + +
    +

    +

    {data.attributes.Name} - {data.attributes.Kota}

    +

    {data.attributes.Telp}

    +

    {data.attributes.Address}

    +

    + + + + View Location + + +
    +
    +
    + ); + }):""; + return ( +
    +
    +
    +
    +

    {title}

    +
    + +
    + {ListDealer||
    } +
    +
    +
    +
    + ); +} + +export default Dealers; \ No newline at end of file diff --git a/components/Company/Home/FeatureProduct.js b/components/Company/Home/FeatureProduct.js new file mode 100644 index 0000000..a5489ed --- /dev/null +++ b/components/Company/Home/FeatureProduct.js @@ -0,0 +1,192 @@ +// import React, { Component } from 'react'; +// import Masonry from 'react-masonry-component'; +// import Link from 'next/link'; + +// const masonryOptions = { +// transitionDuration: 0 +// }; + +// export class Projects extends Component { +// render() { +// const images = this.props.images.map((image, idx) => { +// return ( +//
    +//
    +// portfolio-image + +//
    +// {image.category} +//

    {image.title}

    +//
    + +// +// +// +//
    +//
    +// ) +// }) +// return ( +//
    +//
    +//
    +//

    Our Latest Projects

    +//

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +//
    + +// +// {images} +// +//
    +//
    +// ); +// } +// } + +// Projects.defaultProps = { +// images: [ +// { +// image: "/images/Home/gallery/1.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/2.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/3.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/4.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/5.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/6.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/7.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/8.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/9.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// ] +// } + +// export default Projects; + +import React from 'react'; +import Link from 'next/link'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: true, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + margin: 30, + autoplayTimeout: 5000, + responsive: { + 0:{ + items: 1, + }, + 576:{ + items: 2, + }, + 768:{ + items: 2, + }, + 1024:{ + items: 3, + }, + 1200:{ + items: 4, + } + }, +} + +const Projects = ({company,featuredProduct}) => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + const ListImage = featuredProduct.map((data)=>{ + return( +
    + image +
    + ); + }); + + return (featuredProduct)?( +
    +
    +
    +

    {(company)?company[0]+company.substring(1):'Yamaha'} Featured Motor Product

    +
    +
    +
    + +
    + {display ? + {ListImage} + : ''} +
    + + {/* Shape Images */} +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ):""; +} + +export default Projects; \ No newline at end of file diff --git a/components/Company/Home/MainBanner.js b/components/Company/Home/MainBanner.js new file mode 100644 index 0000000..e93b68e --- /dev/null +++ b/components/Company/Home/MainBanner.js @@ -0,0 +1,37 @@ +import React from 'react'; +import Link from 'next/link'; + +const MainBanner = () => { + return ( +
    +
    +
    +
    +
    +
    +
    +

    Exclusif Motor Untuk Anda

    +

    PT.Thamrin Brother's Yamaha merupakan sebuah bisnis company dari Thamrin Group yang bergerak dalam bidang penjualan produk Motor dan Sparepart Yamaha

    + + + Get Started + +
    +
    + +
    + man +
    +
    +
    +
    +
    +
    + ) +} + +export default MainBanner \ No newline at end of file diff --git a/components/Company/Home/OurServices.js b/components/Company/Home/OurServices.js new file mode 100644 index 0000000..e69d4b4 --- /dev/null +++ b/components/Company/Home/OurServices.js @@ -0,0 +1,64 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const OurServices = () => { + return ( +
    +
    +
    +

    Yamaha 3S Service

    +
    +

    Yamaha 3S Service merupakan pelayanan dari Yamaha untuk meningkatkan kupuasan pelanggan Yamaha

    +
    + +
    +
    +
    +
    + +
    + +

    Selling
    Yamaha Product Selling

    + + + +
    +
    + +
    +
    +
    + +
    + +

    Services
    Yamaha Services Product

    + {/*

    Lorem ipsum eiusmod dolor sit amet elit, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

    */} + + + + +
    +
    + +
    +
    +
    + +
    + +

    Sparepart
    Yamaha Sparepart Product

    + {/*

    Lorem ipsum eiusmod dolor sit amet elit, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

    */} + + + + +
    +
    +
    +
    +
    + ); +} + +export default OurServices; diff --git a/components/Company/Home/Summary.js b/components/Company/Home/Summary.js new file mode 100644 index 0000000..5cf02bb --- /dev/null +++ b/components/Company/Home/Summary.js @@ -0,0 +1,60 @@ +import React from 'react'; +import Link from 'next/link'; + +const FunFactsArea = () => { + return ( +
    +
    +
    +

    Total Penjualan, Service & Dealer Yamaha

    +
    +
    + +
    +
    +
    +

    200

    +

    Product Motor Terjual

    +
    +
    + +
    +
    +

    478

    +

    Service Motor

    +
    +
    + +
    +
    +

    800+

    +

    Sparepart Terjual

    +
    +
    + +
    +
    +

    30

    +

    Dealers yang tersebar di Sumsel & Bengkulu

    +
    +
    +
    + +
    +

    Punya Pertanyaan ?

    +

    Segera Hubungi Kami

    + + + Hubungi Kami + +
    + +
    + map +
    +
    +
    + ) +} + +export default FunFactsArea; \ No newline at end of file diff --git a/components/Company/Home/Testimoni.js b/components/Company/Home/Testimoni.js new file mode 100644 index 0000000..9fb2826 --- /dev/null +++ b/components/Company/Home/Testimoni.js @@ -0,0 +1,227 @@ +import React from 'react'; +import Slider from "react-slick"; +import * as Icon from 'react-feather'; + +const NextArrow = (props) => { + const { onClick } = props; + return ( + + ); +} + +const PrevArrow = (props) => { + const { onClick } = props; + return ( + + ); +} + +class Feedback extends React.Component { + state = { + imagesSlider: null, + thumbnailsSlider: null, + oldSlide: 0, + activeSlide: 0, + activeSlide2: 0 + }; + + componentDidMount() { + this.setState({ + imagesSlider: this.slider1, + thumbnailsSlider: this.slider2 + }); + } + + renderSliderFullContent = () => { + return DEFAULT_PROPS.map(({name,profession,image,content}) => { + return ( +
    +
    +
    +
    + image +
    + +

    {name}

    + {profession} +

    {content}

    +
    +
    +
    + ) + }) + } + + renderSliderImages = () => { + return DEFAULT_PROPS.map(({name, image}) => { + return ( +
    +
    +
    + client +
    +
    +
    + ) + }) + } + + render() { + const sliderSettings1 = { + speed: 100, + slidesToShow: 1, + slidesToScroll: 1, + cssEase: 'linear', + fade: true, + autoplay: true, + draggable: true, + asNavFor: this.state.thumbnailsSlider, + draggable: false, + arrows: false, + nextArrow: false, + prevArrow: false + } + + const sliderSettings2 = { + speed: 300, + slidesToShow: 5, + slidesToScroll: 1, + cssEase: 'linear', + autoplay: true, + centerMode: true, + draggable: false, + focusOnSelect: true, + asNavFor: this.state.imagesSlider, + nextArrow: , + prevArrow: , + beforeChange: (current, next) => this.setState({ oldSlide: current, activeSlide: next }), + afterChange: current => this.setState({ activeSlide2: current }) + } + + return ( +
    +
    +
    +

    Testimoni Customer Yamaha

    +
    +
    + +
    +
    +
    + (this.slider1 = slider)} + {...sliderSettings1} + > + { + this.renderSliderFullContent() + } + +
    +
    + +
    +
    + (this.slider2 = slider)} + {...sliderSettings2} + > + { + this.renderSliderImages() + } + +
    +
    + +
    + +
    + +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ); + } +} + +const DEFAULT_PROPS = [ + { + name: 'David Gale', + profession: 'Web Developer', + image: '/images/client-image/client2.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Matt Damon', + profession: 'Software Engineer', + image: '/images/client-image/client4.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Nicky Parsons', + profession: 'Fictional Character', + image: '/images/client-image/client1.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Jason Momoa', + profession: 'American Actor', + image: '/images/client-image/client5.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Gennady Korotkevich', + profession: 'Sport Programmer', + image: '/images/client-image/client3.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Petr Mitrichev', + profession: 'Russian Programmer', + image: '/images/client-image/client3.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Reid W. Barton', + profession: 'Mathematics', + image: '/images/client-image/client2.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + }, + { + name: 'Lisa Sauermann', + profession: 'Mathematician', + image: '/images/client-image/client1.jpg', + content: 'Quis ipsum suspendisse ultrices gravida. Risus commodo viverra maecenas accumsan lacus vel facilisis. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.' + } +]; + +export default Feedback; diff --git a/components/Company/LatestNews/LatestNews.js b/components/Company/LatestNews/LatestNews.js new file mode 100644 index 0000000..a6ec520 --- /dev/null +++ b/components/Company/LatestNews/LatestNews.js @@ -0,0 +1,146 @@ +import React from 'react'; +import * as Icon from 'react-feather'; +import Link from 'next/link'; + +const News = function ({ backend, news, othernews, ...props }) { + + const NewsList = news.map((data) => { + return ( + <> +
    +
    +
    + + + + + + +
    + {data.published_at} +
    +
    + +
    +

    + + {data.title} + +

    + + By Admin + + + + Read More + + +
    +
    +
    + + ) + }) + + const PopularNews = othernews.map((data) => { + return ( + + ) + }) + return ( +
    +
    +
    +
    +
    +
    + + {NewsList} + + {/* Pagination */} +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + + +
    +
    + + {PopularNews} + +
    +

    Categories

    + + +
    + + +
    +
    +
    +
    +
    +
    + ) +} + +export default News; \ No newline at end of file diff --git a/components/Company/LatestNews/LatestNewsDetail.js b/components/Company/LatestNews/LatestNewsDetail.js new file mode 100644 index 0000000..9508eab --- /dev/null +++ b/components/Company/LatestNews/LatestNewsDetail.js @@ -0,0 +1,137 @@ +import React from 'react'; +import PageBanner from '@/components/Common/PageBanner'; +import * as Icon from 'react-feather'; +import Link from 'next/link'; + +import ReactHtmlParser from "react-html-parser"; + +const News = function ({ backend, news, othernews, ...props }) { + + const NewsList = news.map((data) => { + return ( + <> +
    +
    + image +
    + +
    +
    + +
    + +

    {data.title}

    + +

    {ReactHtmlParser(data.description)}

    + + {/*
    +

    It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.

    + + Tom Cruise +
    */} + +
    + +
    +
    +
    + + ) + }) + + const PopularNews = othernews.map((data) => { + return ( + + ) + }) + return ( +
    + + +
    +
    +
    +
    + + {NewsList} +
    + +
    +
    +
    +
    + + +
    +
    + + {PopularNews} + +
    +

    Categories

    + + +
    + + +
    +
    +
    +
    +
    +
    + ) +} + +export default News; \ No newline at end of file diff --git a/components/Company/Login.js b/components/Company/Login.js new file mode 100644 index 0000000..ee34955 --- /dev/null +++ b/components/Company/Login.js @@ -0,0 +1,68 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const Login = function ({ backend, dealers, ...props }) { + return ( +
    +
    +
    +
    + logo +

    +

    Tidak Punya Akun ? Silahkan Register

    +
    + +
    +
    + + setEmail(event.target.value), + }} + /> +
    + +
    + + setPass(event.target.value), + type: "password", + autoComplete: "off", + }} + /> +
    + + + + +
    + +
    +

    or connect with

    + +
    +
    +
    +
    + ); +} + +export default Login; \ No newline at end of file diff --git a/components/Company/Product/Accessories_Detail.js b/components/Company/Product/Accessories_Detail.js new file mode 100644 index 0000000..f6bdced --- /dev/null +++ b/components/Company/Product/Accessories_Detail.js @@ -0,0 +1,345 @@ +import React from 'react' + +//component +import PageBanner from '@/components/Common/PageBanner'; +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useRouter } from 'next/router' +import { useToasts } from 'react-toast-notifications' + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +import dynamic from 'next/dynamic' +const OwlCarousel = dynamic(import('react-owl-carousel3')) + +//library yarn +import NumberFormat from 'react-number-format'; +import ReactHtmlParser from "react-html-parser"; + +//sweet alert +import swal from 'sweetalert'; + +const options = { + loop: true, + nav: true, + dots: false, + autoplay: true, + items: 1, + smartSpeed: 1000, + autoplayTimeout: 5000, + navText: [ + "", + "" + ], +}; + +const ProductDetails = function ({ detailaccessories, backend, user, ...props }) { + + const [formValue, setFormValue] = React.useState({ + product_img: "", + product_name: "", + product_color: "", + product_price: "", + }); + + const router = useRouter(); + + const MotorDetail = detailaccessories.map((data) => { + + return ( +
    + +
    +
    +
    +
    + + + +
    + +
    +
    +

    {data.name}

    +

    + +

    +
    +
    + + +
    +
    + +
      +
    • +
    • +
    • +
    • +
    • +
    + +
    + Availability: {data.stock} +
    +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + product_name: detailproduct[0].name, + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/AddToCart", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["cart"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + router.push("/yamaha/Shop/Cart"); + } + else { + swal("Produk Gagal Ditambah ke Keranjang", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + + > + {/* + +
    + +
    +
    + + +
    + +
    +
    */} + + {/* */} + + + + +
    + +
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    + +
    + Share: + + +
    +
    +
    + +
    +
    + + + Deskripsi + Info Penting + {/* Review */} + + + +
    +

    {ReactHtmlParser(data.description)}

    +
    +
    + + +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    +
    +
    + ); + }) + + return ( + <> + {MotorDetail} + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Company/Product/Apparel_Detail.js b/components/Company/Product/Apparel_Detail.js new file mode 100644 index 0000000..7747156 --- /dev/null +++ b/components/Company/Product/Apparel_Detail.js @@ -0,0 +1,345 @@ +import React from 'react' + +//component +import PageBanner from '@/components/Common/PageBanner'; +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useRouter } from 'next/router' +import { useToasts } from 'react-toast-notifications' + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +import dynamic from 'next/dynamic' +const OwlCarousel = dynamic(import('react-owl-carousel3')) + +//library yarn +import NumberFormat from 'react-number-format'; +import ReactHtmlParser from "react-html-parser"; + +//sweet alert +import swal from 'sweetalert'; + +const options = { + loop: true, + nav: true, + dots: false, + autoplay: true, + items: 1, + smartSpeed: 1000, + autoplayTimeout: 5000, + navText: [ + "", + "" + ], +}; + +const ProductDetails = function ({ detailapparel, backend, user, ...props }) { + + const [formValue, setFormValue] = React.useState({ + product_img: "", + product_name: "", + product_color: "", + product_price: "", + }); + + const router = useRouter(); + + const MotorDetail = detailapparel.map((data) => { + + return ( +
    + +
    +
    +
    +
    + + + +
    + +
    +
    +

    {data.name}

    +

    + +

    +
    +
    + + +
    +
    + +
      +
    • +
    • +
    • +
    • +
    • +
    + +
    + Availability: {data.stock} +
    +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + product_name: detailproduct[0].name, + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/AddToCart", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["cart"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + router.push("/yamaha/Shop/Cart"); + } + else { + swal("Produk Gagal Ditambah ke Keranjang", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + + > + {/* + +
    + +
    +
    + + +
    + +
    +
    */} + + {/* */} + + + + +
    + +
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    + +
    + Share: + + +
    +
    +
    + +
    +
    + + + Deskripsi + Info Penting + {/* Review */} + + + +
    +

    {ReactHtmlParser(data.description)}

    +
    +
    + + +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    +
    +
    + ); + }) + + return ( + <> + {MotorDetail} + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Company/Product/Helmet_Detail.js b/components/Company/Product/Helmet_Detail.js new file mode 100644 index 0000000..0e33ba0 --- /dev/null +++ b/components/Company/Product/Helmet_Detail.js @@ -0,0 +1,345 @@ +import React from 'react' + +//component +import PageBanner from '@/components/Common/PageBanner'; +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useRouter } from 'next/router' +import { useToasts } from 'react-toast-notifications' + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +import dynamic from 'next/dynamic' +const OwlCarousel = dynamic(import('react-owl-carousel3')) + +//library yarn +import NumberFormat from 'react-number-format'; +import ReactHtmlParser from "react-html-parser"; + +//sweet alert +import swal from 'sweetalert'; + +const options = { + loop: true, + nav: true, + dots: false, + autoplay: true, + items: 1, + smartSpeed: 1000, + autoplayTimeout: 5000, + navText: [ + "", + "" + ], +}; + +const ProductDetails = function ({ detailhelmet, backend, user, ...props }) { + + const [formValue, setFormValue] = React.useState({ + product_img: "", + product_name: "", + product_color: "", + product_price: "", + }); + + const router = useRouter(); + + const MotorDetail = detailhelmet.map((data) => { + + return ( +
    + +
    +
    +
    +
    + + + +
    + +
    +
    +

    {data.name}

    +

    + +

    +
    +
    + + +
    +
    + +
      +
    • +
    • +
    • +
    • +
    • +
    + +
    + Availability: {data.stock} +
    +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + product_name: detailproduct[0].name, + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/AddToCart", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["cart"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + router.push("/yamaha/Shop/Cart"); + } + else { + swal("Produk Gagal Ditambah ke Keranjang", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + + > + {/* + +
    + +
    +
    + + +
    + +
    +
    */} + + {/* */} + + + + +
    + +
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    + +
    + Share: + + +
    +
    +
    + +
    +
    + + + Deskripsi + Info Penting + {/* Review */} + + + +
    +

    {ReactHtmlParser(data.description)}

    +
    +
    + + +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    +
    +
    + ); + }) + + return ( + <> + {MotorDetail} + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Company/Product/Motor.js b/components/Company/Product/Motor.js new file mode 100644 index 0000000..bc85c3d --- /dev/null +++ b/components/Company/Product/Motor.js @@ -0,0 +1,138 @@ +import React from 'react' +import Link from 'next/link' +import * as Icon from 'react-feather' +import { useSelector } from 'react-redux' +import AddToCartBtn from '@/components/others/Shop/AddToCartBtn' +import NumberFormat from 'react-number-format'; +import Select from 'react-select'; +import Router from 'next/router' + +const ProductCard = function ({ selected, product, backend, user, ...props }) { + const products = useSelector((state) => state.products) + + const handleName = values => { + Router.push({ + pathname: '/yamaha/Product/Motor', + query: (values&&values.length!=0)?{ filter: values["name"] }:{}, + }) + } + + const Product = product.map((data) => { + return ( +
    +
    +
    + + + +
    + +
    +

    + + {data.attributes.Name} + +

    + { + (data.attributes.Product_prices.data.length==0) + ?"-" + :(data.attributes.Product_prices.data.length==1) + ?(i.attributes.Price))} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} />) + :( + + i.attributes.Price))} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> + {" s/d "} + i.attributes.Price))} displayType={'text'} thousandSeparator={true} prefix={'Rp.'} /> + + ) + } + {/*
      +
    • +
    • +
    • +
    • +
    • +
    */} + + + Detail Product + +
    +
    +
    + ); + }) + return ( +
    +
    +
    +
    +
    +
    +

    Showing 1-8 of 14 results

    +
    +
    + +
    + { + setFormValue({ + ...formValue, + product_price: e.target.value.toString(), + }) + }} + onChange={e => setProductOTR(e.target.value)} + > + + {detailproduct.Product_prices.data.map((option) => ( + + ))} + +
    +
    + + +
    + +
    +
    + + {/* */} + + + + + + +
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    + +
    + Share: + + +
    +
    +
    + +
    +
    + + + Deskripsi + {/* Info Penting */} + Spesifikasi + {/* Review */} + + + +
    +

    {util.htmlParse(detailproduct.Description)}

    +
    +
    + + {/* +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    */} + + +
    +
      +

      Spesifikasi Mesin

      + {util.htmlParse(detailproduct.Machine)}

      + +

      Spesifikasi Dimensi

      + {util.htmlParse(detailproduct.Dimension)}

      + +

      Spesifikasi Rangka

      + {util.htmlParse(detailproduct.Structure)}

      + +

      Spesifikasi Kelistrikan

      + {util.htmlParse(detailproduct.Voltage)}

      +
    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    +
    + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Company/Product/Sparepart.js b/components/Company/Product/Sparepart.js new file mode 100644 index 0000000..c3e9b12 --- /dev/null +++ b/components/Company/Product/Sparepart.js @@ -0,0 +1,253 @@ +import React from 'react' +import Link from 'next/link' +import * as Icon from 'react-feather' +import { useSelector } from 'react-redux' +import AddToCartBtn from '@/components/others/Shop/AddToCartBtn' +import Select from 'react-select'; +import Router from 'next/router' + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +//yarn library +import NumberFormat from 'react-number-format'; + +const ProductCard = function ({ category,page,selected,products, ...props }) { + const handleName = values => { + Router.push({ + pathname: '/yamaha/Product/Sparepart', + query: (values && values.length != 0) ? { filter: values["name"] } : {}, + }) + } + + category = category.map((i)=>i.replace(' ','_')); + const pagination = (type,pages)=>{ + console.log(type,selected); + var paging = []; + var current = (selected==type)?page:1; + for(var i=1;i<=pages;i++){ + paging.push( + +
  • + {i} +
  • + + ); + } + + return ( +
    +
    +
    + +
    +
    +
    + ); + }; + + const productGrid = function(product){ + if(product){ + return product.map((data) => { + return ( +
    + +
    + ); + }); + } + else return( +
    +
    Belum ada produk untuk saat ini. Tunggu berita selanjutnya dari kami ya!
    +
    ); + } + + return ( +
    +
    +
    +
    + + {/*
    + { + setFormValue({ + ...formValue, + product_price: e.target.value.toString(), + }) + }} + > + + {detailproduct.map((option) => ( + + ))} + {detailproduct.map((option) => ( + + ))} + {detailproduct.map((option) => ( + + ))} + +
    +
    + + +
    + +
    +
    */} + + {/* */} + + + + + + +
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    + +
    + Share: + + +
    +
    +
    + +
    +
    + + + Deskripsi + Info Penting + {/* Review */} + + + +
    +

    {ReactHtmlParser(data.description)}

    +
    +
    + + +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    + + + ); + }) + + return ( + <> + {MotorDetail} + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Company/Product/Ygp_Detail.js b/components/Company/Product/Ygp_Detail.js new file mode 100644 index 0000000..0cc6770 --- /dev/null +++ b/components/Company/Product/Ygp_Detail.js @@ -0,0 +1,346 @@ +import React from 'react' + +//component +import PageBanner from '@/components/Common/PageBanner'; +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useRouter } from 'next/router' +import { useToasts } from 'react-toast-notifications' + +//addon library +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +import dynamic from 'next/dynamic' +const OwlCarousel = dynamic(import('react-owl-carousel3')) + +//library yarn +import NumberFormat from 'react-number-format'; +import ReactHtmlParser from "react-html-parser"; + +//sweet alert +import swal from 'sweetalert'; + +const options = { + loop: true, + nav: true, + dots: false, + autoplay: true, + items: 1, + smartSpeed: 1000, + autoplayTimeout: 5000, + navText: [ + "", + "" + ], +}; + +const ProductDetails = function ({ details, backend, user, ...props }) { + console.log(details); + const [formValue, setFormValue] = React.useState({ + product_img: "", + product_name: "", + product_color: "", + product_price: "", + }); + + const router = useRouter(); + return ( +
    + +
    +
    +
    +
    + + { + (details.Image.data)?details.Image.data.map(i=>( + + )):"" + } + +
    + +
    +
    +

    {details.Name}

    +

    + +

    +
    +
    + + +
    +
    + +
      +
    • +
    • +
    • +
    • +
    • +
    + +
    + Availability: {details.stock} +
    +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + product_name: detailproduct[0].name, + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/AddToCart", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["cart"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + router.push("/yamaha/Shop/Cart"); + } + else { + swal("Produk Gagal Ditambah ke Keranjang", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + + > + {/* + +
    + +
    +
    + + +
    + +
    +
    */} + + {/* */} + + + + +
    + +
    + Metode Pembayaran : + +
    + image + image + image + image + image + image + image +
    +
    + +
    + Share: + + +
    +
    +
    + +
    +
    + + + Deskripsi + Info Penting + {/* Review */} + + + +
    +

    {ReactHtmlParser(details.description)}

    +
    +
    + + +
    +

    +

    Informasi mengenai prosedur pengiriman, pembelian dan dokumen

    +
      +
    • Kota Palembang, Kayu Agung, Prabumulih, Pangkalan Balai, Betung : 2-3 hari kerja*
    • +
    • Untuk daerah Sungsang/daerah lain yang menggunakan kapal motor, maka motor diantar sampai di dermaga sesuai dengan jadwal yang diinformasikan
    • +
    • Sekayu, Babat Toman, Pendopo, Baturaja, Martapura, Muara Dua, Lahat, Tanjung Enim, Tugu Mulyo, Belitang : 4-5 hari kerja*
    • +
    • Lubuk Linggau, Curup, Pagar Alam : 6-7 hari kerja*
    • +
    + +

    Harga

    +
      +
    • Harga OTR sudah termasuk biaya pengiriman dan BBN, kecuali tambahan pengenaan pajak progresif kepemilikan kendaraan bermotor (sesuai dengan peraturan yang telah ditetapkan oleh pemerintah)
    • +
    • Harga OTR diatas berlaku untuk KTP domisili PALEMBANG, OGAN ILIR, dan BANYUASIN, diluar wilayah tersebut harap menghubungi kami untuk konfirmasi harga.
    • +
    • Harga OTR sewaktu-waktu dapat berubah.
    • +
    • Proses pemesanan sepeda motor tidak dapat dibatalkan dan warna yang sudah dipesan tidak dapat diubah.
    • +
    • Proses pemesanan yang terkait waktu pengiriman produk dan kelengkapan dokumen yang dibutuhkan untuk pembuatan STNK dan BPKB akan diinformasikan oleh pihak Dealer.
    • +
    • Proses pengiriman sepeda motor akan dilakukan setelah pelunasan transaksi dan dokumen yang dibutuhkan telah lengkap.
    • +
    + +

    Dokumen

    +
      +
    • Proses pembuatan STNK setelah KTP diterima oleh pihak dealer adalah 19-25 hari kerja*.
    • +
    • Proses pembuatan BPKB adalah 3-4 bulan.
    • +
    • STNK dan BPKB wajib diambil sendiri oleh pihak yang bersangkutan sesuai dengan identitas yang tertera STNK di dealer yang ditunjuk.
    • +
    • Untuk proses pembuatan STNK dan BPKB sepenuhnya menjadi tanggung jawab dealer terkait.
    • +
    • Buku servis diterima bersamaan dengan pengiriman sepeda motor.
    • +
    + +

    *tidak termasuk Sabtu dan Minggu.

    +

    +
    +
    + + {/* +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    */} +
    +
    +
    +
    +
    +
    +
    + ); + + + return ( + <> + {MotorDetail} + + ) +} + +export default ProductDetails; \ No newline at end of file diff --git a/components/Company/Shop/Cart.js b/components/Company/Shop/Cart.js new file mode 100644 index 0000000..7237f02 --- /dev/null +++ b/components/Company/Shop/Cart.js @@ -0,0 +1,244 @@ +import React from 'react' +import Link from 'next/link' +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useToasts } from 'react-toast-notifications' +import { useRouter } from 'next/router' +import QtyForm from './QtyForm' + +//library yarn +import NumberFormat from 'react-number-format'; + +//sweet alert +import swal from 'sweetalert'; + +const CartContent = function ({ backend, cart_product, ...props }) { + const router = useRouter() + const { addToast } = useToasts() + const dispatch = useDispatch() + const cart = useSelector((state) => state.cart) + const total = useSelector((state) => state.total) + // console.log(cart) + + const [qty, setQty] = React.useState(1) + + const increment = () => { + setQty(qty + 1) + } + + const decrement = () => { + setQty(qty - 1) + } + + const removeItem = () => { + dispatch({ + type: 'REMOVE_ITEM', + id: pId + }) + addToast('Cart Removed Successfully', { appearance: 'error' }) + } + + const reset = () => { + dispatch({ + type: 'RESET' + }) + addToast('Thanks for your order.', { appearance: 'success' }) + router.push('/') + } + + const [formValue, setFormValue] = React.useState({ + transaction_id: GenerateID(), + product_img: "", + product_name: "", + product_color: "", + product_quantity: "", + product_total: "", + }); + + function GenerateID() { + var dt = new Date().getTime(); + var uuid = 'Trx-Ord-yyyyyyyy'.replace(/[y]/g, function (c) { + var r = (dt + Math.random() * 16) % 16 | 0; + dt = Math.floor(dt / 16); + return (c == 'x' ? r : (r & 0x3 | 0x8)).toString(16); + }); + return uuid; + } + + // console.log(GenerateID()); + + return ( +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + product_name: cart_product[0].product_name, + product_color: cart_product[0].product_color, + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/AddToCheckout", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["checkout"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + router.push("/yamaha/Shop/Checkout"); + } + else { + swal("Produk Gagal di Checkout", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + > +
    + + + + + + + + + + + + + + {cart_product.length ? cart_product.map(data => ( + + + + + + + + + + + + {/* */} + + + )) : ( + + + + )} + + +
    ProductNama ProductWarna ProductHarga ProductJumlahTotal
    + + + {/* item */} + + + + + {data.product_name} + + + + {data.product_color} + + + + +
    + + + + + e} + name="product_quantity" + onInput={(e) => { + setFormValue({ + ...formValue, + product_quantity: e.target.value.toString(), + }) + }} + /> + + + + +
    +
    + + + {removeItem(data.id)}}> + + + + + { + setFormValue({ + ...formValue, + product_total: e.target.value.toString(), + }) + // console.log("isi target value : ", e.target.value); + }} + /> + + + { removeItem(data) }}> + + +
    Tidak Ada Product di Keranjang
    +
    + +
    +
    + +
    +
    + +
    +

    Cart Totals

    + +
      +
    • Subtotal ${total.toFixed(2)}
    • +
    • Total ${(total + 10).toFixed(2)}
    • +
    + + {/* + { + e.preventDefault(); + reset() + }} className="btn btn-primary">Proceed to Checkout + + */} + + +
    +
    + ) +} + +export default CartContent diff --git a/components/Company/Shop/Checkout.js b/components/Company/Shop/Checkout.js new file mode 100644 index 0000000..fcd26e8 --- /dev/null +++ b/components/Company/Shop/Checkout.js @@ -0,0 +1,489 @@ +import React from 'react'; +import * as Icon from 'react-feather'; + +import { + Accordion, + AccordionItem, + AccordionItemHeading, + AccordionItemPanel, + AccordionItemButton +} from 'react-accessible-accordion'; + +//library yarn +import NumberFormat from 'react-number-format'; + +//sweet alert +import swal from 'sweetalert'; + +const CheckoutContent = function ({ backend, checkout_product, user, provinces, ...props }) { + const [formValue, setFormValue] = React.useState({ + order_id: "", + product_name: "", + product_color: "", + product_quantity: "", + product_price: "", + product_courier: "JNE", + cust_name: "", + cust_telp: "", + cust_email: "", + cust_postCode: "", + cust_address: "", + cust_village: "", + cust_district: "", + cust_city: "", + cust_province: "", + note: "", + }); + + return ( + <> +
    +
    +
    +
    +
    + + Returning customer? Click here to login +
    +
    +
    + +
    { + e.preventDefault(); + var newformValue = { + ...formValue, + order_id: checkout_product[0].transaction_id, + product_name: checkout_product[0].product_name, + product_color: checkout_product[0].product_color, + product_quantity: checkout_product[0].product_quantity, + product_price: checkout_product[0].product_total, + } + setFormValue(newformValue) + // console.log(JSON.stringify(newformValue)); + const response = await fetch( + "/api/transaction/create", + { + method: "POST", + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(newformValue), + } + ); + if (response.ok) { + var res = await response.json(); + // console.log("cek response :", res); + if (res["STATUS"] === 1) { + res["DATA"]["transaction"]; + swal("Produk Berhasil Ditambah ke Keranjang", "Silahkan Cek Keranjang Belanja Anda", "success"); + // router.push("/yamaha/Shop/Cart"); + } + else { + swal("Produk Gagal Ditambah ke Keranjang", "Silahkan Coba Lagi", "error"); + } + } else { + swal("Transaksi Gagal", "Silahkan Coba Lagi", "error"); + } + return false; + }} + > +
    +
    +
    +

    Alamat Pengiriman

    + +
    +
    +
    + + { + setFormValue({ + ...formValue, + cust_name: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_telp: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_email: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_postCode: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_village: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_district: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_city: e.target.value.toString(), + }) + }} + /> +
    +
    + +
    +
    + + { + setFormValue({ + ...formValue, + cust_province: e.target.value.toString(), + }) + }} + /> +
    +
    + + {/*
    +
    + + +
    + +
    +
    +
    */} + + {/*
    +
    + + +
    +
    + +
    +
    + + +
    +
    */} + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    +

    Metode Pengiriman

    + +
    +
    +
    +
    + + + + + JNE
    +

    + Akan diterima pada tanggal 13 - 16 Nov
    +

    +
    +
    + +

    Pilih Waktu Pengiriman

    + + Pengiriman Setiap Saat
    + Disarankan untuk alamat rumah

    + + Pengiriman Pada Jam Kantor
    + Disarankan untuk alamat rumah

    +
    +
    + + + + + Kargo - JNE Trucking (JTR)
    +

    + Akan diterima pada tanggal 14 - 17 Nov
    +

    +
    +
    + +

    Pilih Waktu Pengiriman

    + + Pengiriman Setiap Saat
    + Disarankan untuk alamat rumah

    + + Pengiriman Pada Jam Kantor
    + Disarankan untuk alamat rumah

    +
    +
    + + + + + Next Day
    +

    + Akan diterima pada tanggal 13 - 14 Nov

    +
    +
    + +

    Pilih Waktu Pengiriman

    + + Pengiriman Setiap Saat
    + Disarankan untuk alamat rumah

    + + Pengiriman Pada Jam Kantor
    + Disarankan untuk alamat rumah

    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +

    Pesanan Anda

    + +
    + + + + + + + + + + + {checkout_product.length ? checkout_product.map(data => ( + + + + + + + + )) : ( + + + + )} + + + + + + + + + + + + + + + + + + + + + + + + + +
    Nama ProdukJumlahTotal
    + {data.product_name} + + {data.product_quantity} Unit + + + + +
    Tidak Ada Product di Keranjang
    + Cart Subtotal + + + + 10$2.00 +
    + Shipping + + + + $5.00 +
    + Order Total + + + + $215.00 +
    +
    + + {/*
    +

    + + + + Make your payment directly into our bank account. Please use your Order ID as the payment reference. Your order will not be shipped until the funds have cleared in our account. +

    +

    + + +

    +

    + + +

    +
    */} + + +
    +
    +
    +
    +
    +
    + + + ) +} + +export default CheckoutContent; \ No newline at end of file diff --git a/components/Company/Shop/OrderSummary.js b/components/Company/Shop/OrderSummary.js new file mode 100644 index 0000000..4b8f7ab --- /dev/null +++ b/components/Company/Shop/OrderSummary.js @@ -0,0 +1,149 @@ +import React from 'react'; +import { + Accordion, + AccordionItem, + AccordionItemHeading, + AccordionItemPanel, + AccordionItemButton +} from 'react-accessible-accordion'; + +const OrderSummary = () => { + return ( + <> +
    +
    +
    + + + + + + Nomer Pemesanan - Pesanan Sedang di Proses + + + + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. +

    +
    +
    + + + + + + Is Smart Lock required for instant apps? + + + + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. +

    +
    +
    + + + + + + Can I have multiple activities in a single feature? + + + + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. +

    +
    +
    + + + + + + Can I share resources between features? + + + + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. +

    +
    +
    + + + + + + Is multidex supported for instant apps? + + + + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. +

    +
    +
    + + + + + + Can I share resources between features? + + + + +

    + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. incididunt ut labore et dolore magna aliqua. +

    +
    +
    +
    +
    + +
    +

    Ask Your Question

    +
    +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + ) +} + +export default OrderSummary; \ No newline at end of file diff --git a/components/Company/Shop/QtyForm.js b/components/Company/Shop/QtyForm.js new file mode 100644 index 0000000..beaea59 --- /dev/null +++ b/components/Company/Shop/QtyForm.js @@ -0,0 +1,53 @@ +import React from 'react' +import { useDispatch } from 'react-redux' +import * as Icon from 'react-feather' + +const QtyForm = ({ id, quantity}) => { + + const dispatch = useDispatch() + + const addQuantity = (pId) => { + dispatch({ + type: 'ADD_QUANTITY', + id: pId + }) + } + + const subQuantity = (pId) => { + dispatch({ + type: 'SUB_QUANTITY', + id: pId + }) + } + return ( +
    + { + e.preventDefault(); + subQuantity(id); + }} + > + + + + (e)} + /> + + { + e.preventDefault(); + addQuantity(id); + }}> + + +
    + ) +} + +export default QtyForm diff --git a/components/MainWebsite/BusineesPartner.js b/components/MainWebsite/BusineesPartner.js new file mode 100644 index 0000000..6907dd9 --- /dev/null +++ b/components/MainWebsite/BusineesPartner.js @@ -0,0 +1,63 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const OurServices = ({companies}) => { + const partners = companies.map((data, index) => { + return ( +
    +
    + image +
    +

    {data.attributes.Business_name}
    {data.attributes.Name}

    +


    + + + +
    +
    + ); + }); + return ( +
    +
    +
    +

    Thamrin Group Businees Partner

    +
    +

    Thamrin Group mempunyai beberapa Businees Partner sebagai Unit Bisnis nya, antar lain

    +
    + +
    + {partners} +
    +
    +
    + ); +} + +export default OurServices; + diff --git a/components/MainWebsite/EmailSubscription.js b/components/MainWebsite/EmailSubscription.js new file mode 100644 index 0000000..54df17c --- /dev/null +++ b/components/MainWebsite/EmailSubscription.js @@ -0,0 +1,59 @@ +import React from 'react'; +import subscription from '../../api/subscription/subscription'; + +const Newsletter = () => { + const [email, setEmail] = React.useState(""); + return ( +
    +
    +
    +
    +
    + image +
    +
    + +
    +
    +

    Enter Your Email For Get Info & Promo

    + +
    { + e.preventDefault(); + if(email&&email!=""){ + var res = await subscription.subscribe(email); + setEmail(""); + if(res["STATUS"]==1){ + alert("Email Subscribed!!"); + }else{ + if(res["DATA"].toUpperCase().includes("UNIQUE")){ + alert("Email Already Subscribed!"); + } + } + } + }}> + setEmail(e.target.value)}name="email" type="email" className="input-newsletter" value={email} placeholder="Enter your business email here" /> + +
    +
    +
    +
    +
    + + {/* Shape Images */} +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ); +} + +export default Newsletter; \ No newline at end of file diff --git a/components/MainWebsite/Footer.js b/components/MainWebsite/Footer.js new file mode 100644 index 0000000..42075e0 --- /dev/null +++ b/components/MainWebsite/Footer.js @@ -0,0 +1,188 @@ +import React from 'react'; +import Link from 'next/link'; +import { Link as LinkScroll} from 'react-scroll'; +import * as Icon from 'react-feather'; + +const Footer = ({info,social,desc,isHome}) => { + info = (info == null)?{ + Email : "", + Telp :"", + Address : "", + }:info; + isHome = (isHome == null)?true:isHome; + const currentYear = new Date().getFullYear(); + const Socials = (social)?social.map((data,idx)=>{ + return( +
  • + + { + (data.attributes.Type =='Facebook') + ?() + :(data.attributes.Type =='Instagram') + ?() + :(data.attributes.Type =='Twitter') + ?() + :(data.attributes.Type =='Youtube') + ?():"" + } + +
  • + ); + }):""; + + return ( + + ) + +} + +export default Footer; \ No newline at end of file diff --git a/components/MainWebsite/Header.js b/components/MainWebsite/Header.js new file mode 100644 index 0000000..758afbe --- /dev/null +++ b/components/MainWebsite/Header.js @@ -0,0 +1,170 @@ +import React, { useState } from "react"; +import { Link as LinkScroll} from 'react-scroll' +import Link from 'next/link'; + +const Header = ({sticky,isHome}) => { + isHome = (isHome == null)?true:isHome; + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + if(!(sticky||false)){ + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + } + else{ + elementId.classList.add("is-sticky"); + } + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default Header; \ No newline at end of file diff --git a/components/MainWebsite/IndustriesWeServe.js b/components/MainWebsite/IndustriesWeServe.js new file mode 100644 index 0000000..7c132bb --- /dev/null +++ b/components/MainWebsite/IndustriesWeServe.js @@ -0,0 +1,36 @@ +import React from 'react'; +import Link from 'next/link'; + +const IndustriesWeServe = ({industries}) => { + const Industry = industries?industries.map((data,index)=>{ + return ( +
    +
    +
    + {data.attributes.Name} +
    +
    + ); + }):""; + return ( +
    +
    +
    +

    Sektor Industri

    +
    +

    Kami melayani berbagai macam sektor industri, antara lain

    +
    + +
    + {Industry} +
    +
    + +
    + image +
    +
    + ) +} + +export default IndustriesWeServe; \ No newline at end of file diff --git a/components/Yamaha/Header.js b/components/Yamaha/Header.js new file mode 100644 index 0000000..88b7645 --- /dev/null +++ b/components/Yamaha/Header.js @@ -0,0 +1,250 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +export default function NavbarYamaha({ company,icon,username, ...props }) { + const [menu, setMenu] = React.useState(true) + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + return ( + + ); +} \ No newline at end of file diff --git a/components/_App/Footer.js b/components/_App/Footer.js new file mode 100644 index 0000000..c835af9 --- /dev/null +++ b/components/_App/Footer.js @@ -0,0 +1,214 @@ +import React from 'react'; +import Link from 'next/link'; +import { Link as LinkScroll} from 'react-scroll'; +import * as Icon from 'react-feather'; + +const Footer = () => { + + const currentYear = new Date().getFullYear(); + + return ( + + ) + +} + +export default Footer; \ No newline at end of file diff --git a/components/_App/GoTop.js b/components/_App/GoTop.js new file mode 100644 index 0000000..bf27b93 --- /dev/null +++ b/components/_App/GoTop.js @@ -0,0 +1,45 @@ +import React from 'react'; +import * as Icon from 'react-feather'; + +const GoTop = ({scrollStepInPx, delayInMs}) => { + + const [thePosition, setThePosition] = React.useState(false); + const timeoutRef = React.useRef(null); + + React.useEffect(() => { + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + setThePosition(true) + } else { + setThePosition(false); + } + }); + }, []) + + const onScrollStep = () => { + if (window.pageYOffset === 0){ + clearInterval(timeoutRef.current); + } + window.scroll(0, window.pageYOffset - scrollStepInPx); + } + + const scrollToTop = () => { + timeoutRef.current = setInterval(onScrollStep, delayInMs); + } + + const renderGoTopIcon = () => { + return ( +
    + +
    + ) + } + + return ( + + {renderGoTopIcon()} + + ) +} + +export default GoTop; \ No newline at end of file diff --git a/components/_App/Layout.js b/components/_App/Layout.js new file mode 100644 index 0000000..a8637ff --- /dev/null +++ b/components/_App/Layout.js @@ -0,0 +1,20 @@ +import React from 'react' +import Head from "next/head" +import GoTop from './GoTop' + +const Layout = ({ children }) => { + return( + <> + + + + Thamrin Group + + {children} + + + + ) +} + +export default Layout \ No newline at end of file diff --git a/components/_App/Navbar.js b/components/_App/Navbar.js new file mode 100644 index 0000000..1d99094 --- /dev/null +++ b/components/_App/Navbar.js @@ -0,0 +1,429 @@ +import React from "react" +import Link from '@/utils/ActiveLink' +import * as Icon from 'react-feather' +import { useSelector } from 'react-redux' + +const Navbar = () => { + const cart = useSelector((state) => state.cart) + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default Navbar; \ No newline at end of file diff --git a/components/_App/NavbarStyleFive.js b/components/_App/NavbarStyleFive.js new file mode 100644 index 0000000..9370d45 --- /dev/null +++ b/components/_App/NavbarStyleFive.js @@ -0,0 +1,428 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +const NavbarStyleFive = () => { + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default NavbarStyleFive; \ No newline at end of file diff --git a/components/_App/NavbarStyleFour.js b/components/_App/NavbarStyleFour.js new file mode 100644 index 0000000..a2101c7 --- /dev/null +++ b/components/_App/NavbarStyleFour.js @@ -0,0 +1,422 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +const NavbarStyleFour = () => { + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default NavbarStyleFour; \ No newline at end of file diff --git a/components/_App/NavbarStyleSix.js b/components/_App/NavbarStyleSix.js new file mode 100644 index 0000000..4f5f70f --- /dev/null +++ b/components/_App/NavbarStyleSix.js @@ -0,0 +1,439 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +const NavbarStyleSix = () => { + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default NavbarStyleSix; \ No newline at end of file diff --git a/components/_App/NavbarStyleThree.js b/components/_App/NavbarStyleThree.js new file mode 100644 index 0000000..a8fe1a0 --- /dev/null +++ b/components/_App/NavbarStyleThree.js @@ -0,0 +1,439 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +const NavbarStyleThree = () => { + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default NavbarStyleThree; \ No newline at end of file diff --git a/components/_App/NavbarStyleTwo.js b/components/_App/NavbarStyleTwo.js new file mode 100644 index 0000000..7dac161 --- /dev/null +++ b/components/_App/NavbarStyleTwo.js @@ -0,0 +1,439 @@ +import React, { useState } from "react"; +import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +const NavbarStyleTwo = () => { + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default NavbarStyleTwo; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/BigdataFunFacts.js b/components/others/BigdataAnalytics/BigdataFunFacts.js new file mode 100644 index 0000000..c5c12d4 --- /dev/null +++ b/components/others/BigdataAnalytics/BigdataFunFacts.js @@ -0,0 +1,57 @@ +import React from 'react'; +import Link from 'next/link'; + +const BigdataFunFacts = () => { + return ( +
    +
    +
    +

    We always try to understand users expectation

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +

    180K

    +

    Downloaded

    +
    +
    + +
    +
    +

    20K

    +

    Feedback

    +
    +
    + +
    +
    +

    500+

    +

    Workers

    +
    +
    + +
    +
    +

    70+

    +

    Contributors

    +
    +
    +
    + +
    +

    Have any question about us?

    +

    Don't hesitate to contact us

    + + + Contact Us + +
    +
    +
    + ) +} + +export default BigdataFunFacts; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/BlogPost.js b/components/others/BigdataAnalytics/BlogPost.js new file mode 100644 index 0000000..9d21678 --- /dev/null +++ b/components/others/BigdataAnalytics/BlogPost.js @@ -0,0 +1,142 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const BlogPost = () => { + return ( +
    +
    +
    +

    Our Recent Story

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +
    + + + image + + +
    + +
    +
    +
      +
    • Admin
    • +
    • August 15, 2021
    • +
    +
    + +

    + + Making Peace With The Feast Or Famine Of Freelancing + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

    + + + + Read Story + + +
    +
    +
    + +
    +
    +
    + + image + +
    + +
    +
    +
      +
    • Admin
    • +
    • August 18, 2021
    • +
    +
    + +

    + + I Used The Web For A Day On A 50 MB Budget + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

    + + + + Read Story + + +
    +
    +
    + +
    +
    +
    + + image + +
    + +
    +
    +
      +
    • Admin
    • +
    • August 15, 2021
    • +
    +
    + +

    + + Here are the 5 most telling signs of micromanagement + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

    + + + + Read Story + + +
    +
    +
    +
    +
    + + {/* Shape Images */} +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ) +} + +export default BlogPost; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/DiscoverArea.js b/components/others/BigdataAnalytics/DiscoverArea.js new file mode 100644 index 0000000..04fcc27 --- /dev/null +++ b/components/others/BigdataAnalytics/DiscoverArea.js @@ -0,0 +1,36 @@ +import React from 'react'; +import Link from 'next/link'; + +const DiscoverArea = () => { + return ( +
    +
    +
    +
    +
    + image + image +
    +
    + +
    +
    +

    Engaging New Audiences through Smart Approach

    +

    There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage.

    + + + Discover More + +
    +
    +
    +
    + +
    + image +
    +
    + ) +} + +export default DiscoverArea; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/Feedback.js b/components/others/BigdataAnalytics/Feedback.js new file mode 100644 index 0000000..8b02e75 --- /dev/null +++ b/components/others/BigdataAnalytics/Feedback.js @@ -0,0 +1,61 @@ +import React from 'react'; + +const Feedback = () => { + return ( +
    +
    +
    +

    What Users Saying

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +
    +

    Sed ut perspiciatis unde omnis iste natus error sit voluptatem accus antium doloremque laudantium, totam rem aperiam, eaque ipsaquaeab illo.

    +
    + +
    + image +

    David Luis

    + Founder & CEO +
    +
    +
    + +
    +
    +
    +

    Sed ut perspiciatis unde omnis iste natus error sit voluptatem accus antium doloremque laudantium, totam rem aperiam, eaque ipsaquaeab illo.

    +
    + +
    + image +

    Steven Smith

    + Developer +
    +
    +
    + +
    +
    +
    +

    Sed ut perspiciatis unde omnis iste natus error sit voluptatem accus antium doloremque laudantium, totam rem aperiam, eaque ipsaquaeab illo.

    +
    + +
    + image +

    Sarah Lucy

    + Designer +
    +
    +
    +
    +
    +
    + ) +} + +export default Feedback; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/IndustriesWeServe.js b/components/others/BigdataAnalytics/IndustriesWeServe.js new file mode 100644 index 0000000..8a72b67 --- /dev/null +++ b/components/others/BigdataAnalytics/IndustriesWeServe.js @@ -0,0 +1,120 @@ +import React from 'react'; +import Link from 'next/link'; + +const IndustriesWeServe = () => { + return ( +
    +
    +
    +

    Industries We Serve

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +
    + +
    + Manufacturing + + + +
    +
    + +
    +
    +
    + +
    + Healthcare + + + +
    +
    + +
    +
    +
    + +
    + Automobile + + + +
    +
    + +
    +
    +
    + +
    + Banking + + + +
    +
    + +
    +
    +
    + +
    + Real Estate + + + +
    +
    + +
    +
    +
    + +
    + Logistics + + + +
    +
    + +
    +
    +
    + +
    + Insurance + + + +
    +
    + +
    +
    +
    + +
    + Capital Markets + + + +
    +
    +
    +
    + +
    + image +
    +
    + ) +} + +export default IndustriesWeServe; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/MainBanner.js b/components/others/BigdataAnalytics/MainBanner.js new file mode 100644 index 0000000..86b76e5 --- /dev/null +++ b/components/others/BigdataAnalytics/MainBanner.js @@ -0,0 +1,58 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const MainBanner = () => { + return ( +
    +
    +
    +

    Leading Big Data Analytics Company

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Quis ipsum suspendisse ultrices gravida.

    + + + Get Started + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +

    Analyze Your Data

    +

    Lorem ipsum dolor sit amet elit, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

    +
    +
    + +
    +
    +
    + +
    +

    Customized Plan

    +

    Lorem ipsum dolor sit amet elit, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

    +
    +
    + +
    +
    +
    + +
    +

    Implement Solution

    +

    Lorem ipsum dolor sit amet elit, adipiscing, sed do eiusmod tempor incididunt ut labore dolore magna aliqua.

    +
    +
    +
    +
    +
    +
    + ) +} + +export default MainBanner; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/Services.js b/components/others/BigdataAnalytics/Services.js new file mode 100644 index 0000000..c465bb5 --- /dev/null +++ b/components/others/BigdataAnalytics/Services.js @@ -0,0 +1,165 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const Services = () => { + return ( +
    +
    +
    +

    Services We Can Help You With

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +
    + image +
    +

    + + Big Data Analysis + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ut labore et dolore magna aliqua.

    + + + + Learn More + + + +
    + image +
    +
    +
    + +
    +
    +
    + image +
    +

    + + Robust Analytics + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ut labore et dolore magna aliqua.

    + + + + Learn More + + + +
    + image +
    +
    +
    + +
    +
    +
    + image +
    +

    + + Marketing Analytics + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ut labore et dolore magna aliqua.

    + + + + Learn More + + + +
    + image +
    +
    +
    + +
    +
    +
    + image +
    +

    + + Data Visualization + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ut labore et dolore magna aliqua.

    + + + + Learn More + + + +
    + image +
    +
    +
    + +
    +
    +
    + image +
    +

    + + Securities Research + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ut labore et dolore magna aliqua.

    + + + + Learn More + + + +
    + image +
    +
    +
    + +
    +
    +
    + image +
    +

    + + Data Governance + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod ut labore et dolore magna aliqua.

    + + + + Learn More + + + +
    + image +
    +
    +
    +
    +
    +
    + ) +} + +export default Services; \ No newline at end of file diff --git a/components/others/BigdataAnalytics/WhatWeDo.js b/components/others/BigdataAnalytics/WhatWeDo.js new file mode 100644 index 0000000..3878301 --- /dev/null +++ b/components/others/BigdataAnalytics/WhatWeDo.js @@ -0,0 +1,107 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const WhatWeDo = () => { + return ( +
    +
    +
    +

    What We Do

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +
    + +
    +

    + + Research + +

    +

    Lorem ipsum dolor sit consectetur, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

    + + + Market Research + + + + Investment Research + + + + + Read More + + +
    +
    + +
    +
    +
    + +
    + +

    + + Analytics + +

    + +

    Lorem ipsum dolor sit consectetur, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

    + + + Data Analytics + + + + Business Intelligence + + + + + Read More + + +
    +
    + +
    +
    +
    + +
    +

    + + Technology + +

    +

    Lorem ipsum dolor sit consectetur, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

    + + + Intelligence Automation + + + + Quality Engineering + + + + + Read More + + +
    +
    +
    +
    +
    + ) +} + +export default WhatWeDo; \ No newline at end of file diff --git a/components/others/Blog/BlogSidebar.js b/components/others/Blog/BlogSidebar.js new file mode 100644 index 0000000..081b21c --- /dev/null +++ b/components/others/Blog/BlogSidebar.js @@ -0,0 +1,108 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const BlogSidebar = () => { + return ( +
    +
    +
    + + +
    +
    + +
    +

    Popular Posts

    + + + + + + +
    + +
    +

    Categories

    + + +
    + + +
    + ) +} + +export default BlogSidebar; \ No newline at end of file diff --git a/components/others/Cart/CartContent.js b/components/others/Cart/CartContent.js new file mode 100644 index 0000000..432a511 --- /dev/null +++ b/components/others/Cart/CartContent.js @@ -0,0 +1,126 @@ +import React from 'react' +import Link from 'next/link' +import * as Icon from 'react-feather' +import { useSelector, useDispatch } from 'react-redux' +import { useToasts } from 'react-toast-notifications' +import { useRouter } from 'next/router' +import QtyForm from './QtyForm' + +const CartContent = () => { + const router = useRouter() + const { addToast } = useToasts() + const dispatch = useDispatch() + const cart = useSelector((state) => state.cart) + const total = useSelector((state) => state.total) + // console.log(cart) + + const removeItem = (pId) => { + dispatch({ + type: 'REMOVE_ITEM', + id: pId + }) + addToast('Cart Removed Successfully', { appearance: 'error' }) + } + + const reset = () => { + dispatch({ + type: 'RESET' + }) + addToast('Thanks for your order.', { appearance: 'success' }) + router.push('/') + } + + return ( + <> +
    + + + + + + + + + + + + + {cart.length ? cart.map(crt => ( + + + + + + + + + + + + )) : ( + + + + )} + + +
    ProductNameUnit PriceQuantityTotal
    + + + item + + + + + {crt.name} + + + ${crt.price} + + + + ${(crt.quantity * crt.price).toFixed(2)} + + {removeItem(crt.id)}}> + + +
    Empty
    +
    + +
    +
    + + +
    + + Update Cart + +
    +
    +
    + +
    +

    Cart Totals

    + +
      +
    • Subtotal ${total.toFixed(2)}
    • +
    • Shipping $10.00
    • +
    • Total ${(total + 10).toFixed(2)}
    • +
    + + + { + e.preventDefault(); + reset() + }} className="btn btn-primary">Proceed to Checkout + +
    + + ) +} + +export default CartContent diff --git a/components/others/Cart/QtyForm.js b/components/others/Cart/QtyForm.js new file mode 100644 index 0000000..235d638 --- /dev/null +++ b/components/others/Cart/QtyForm.js @@ -0,0 +1,51 @@ +import React from 'react' +import { useDispatch } from 'react-redux' +import * as Icon from 'react-feather' + +const QtyForm = ({ id, quantity}) => { + const dispatch = useDispatch() + + const addQuantity = (pId) => { + dispatch({ + type: 'ADD_QUANTITY', + id: pId + }) + } + + const subQuantity = (pId) => { + dispatch({ + type: 'SUB_QUANTITY', + id: pId + }) + } + return ( +
    + { + e.preventDefault(); + subQuantity(id); + }} + > + + + + (e)} + /> + + { + e.preventDefault(); + addQuantity(id); + }}> + + +
    + ) +} + +export default QtyForm diff --git a/components/others/Home/BlogPost.js b/components/others/Home/BlogPost.js new file mode 100644 index 0000000..142746a --- /dev/null +++ b/components/others/Home/BlogPost.js @@ -0,0 +1,141 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const BlogPost = () => { + return ( +
    +
    +
    +

    Latest News

    +
    +
    + +
    +
    +
    +
    + + + image + + +
    + +
    +
    +
      +
    • Admin
    • +
    • August 15, 2021
    • +
    +
    + +

    + + Making Peace With The Feast Or Famine Of Freelancing + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

    + + + + Read Story + + +
    +
    +
    + +
    +
    +
    + + image + +
    + +
    +
    +
      +
    • Admin
    • +
    • August 18, 2021
    • +
    +
    + +

    + + I Used The Web For A Day On A 50 MB Budget + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

    + + + + Read Story + + +
    +
    +
    + +
    +
    +
    + + image + +
    + +
    +
    +
      +
    • Admin
    • +
    • August 15, 2021
    • +
    +
    + +

    + + Here are the 5 most telling signs of micromanagement + +

    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod...

    + + + + Read Story + + +
    +
    +
    +
    +
    + + {/* Shape Images */} +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ) +} + +export default BlogPost; \ No newline at end of file diff --git a/components/others/Home/BusineesPartner.js b/components/others/Home/BusineesPartner.js new file mode 100644 index 0000000..a739266 --- /dev/null +++ b/components/others/Home/BusineesPartner.js @@ -0,0 +1,57 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const OurServices = ({companies}) => { + const partners = companies.map((data, index) => { + return ( +
    +
    + image +
    +

    {data.attributes.Business_name}
    {data.attributes.Name}

    +


    + + + +
    +
    + ); + }); + return ( +
    +
    +
    +

    Thamrin Group Businees Partner

    +
    +

    Thamrin Group mempunyai beberapa Businees Partner sebagai Unit Bisnis nya, antar lain

    +
    + +
    + {partners} +
    +
    +
    + ); +} + +export default OurServices; + diff --git a/components/others/Home/EmailSubscription.js b/components/others/Home/EmailSubscription.js new file mode 100644 index 0000000..aa51b9f --- /dev/null +++ b/components/others/Home/EmailSubscription.js @@ -0,0 +1,59 @@ +import React from 'react'; +import subscription from '../../../api/subscription/subscription'; + +const Newsletter = () => { + const [email, setEmail] = React.useState(""); + return ( +
    +
    +
    +
    +
    + image +
    +
    + +
    +
    +

    Enter Your Email For Get Info & Promo

    + +
    { + e.preventDefault(); + if(email&&email!=""){ + var res = await subscription.subscribe(email); + setEmail(""); + if(res["STATUS"]==1){ + alert("Email Subscribed!!"); + }else{ + if(res["DATA"].toUpperCase().includes("UNIQUE")){ + alert("Email Already Subscribed!"); + } + } + } + }}> + setEmail(e.target.value)}name="email" type="email" className="input-newsletter" value={email} placeholder="Enter your business email here" /> + +
    +
    +
    +
    +
    + + {/* Shape Images */} +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + shape +
    +
    + ); +} + +export default Newsletter; \ No newline at end of file diff --git a/components/others/Home/Footer.js b/components/others/Home/Footer.js new file mode 100644 index 0000000..c835af9 --- /dev/null +++ b/components/others/Home/Footer.js @@ -0,0 +1,214 @@ +import React from 'react'; +import Link from 'next/link'; +import { Link as LinkScroll} from 'react-scroll'; +import * as Icon from 'react-feather'; + +const Footer = () => { + + const currentYear = new Date().getFullYear(); + + return ( + + ) + +} + +export default Footer; \ No newline at end of file diff --git a/components/others/Home/Gallery.js b/components/others/Home/Gallery.js new file mode 100644 index 0000000..0525b73 --- /dev/null +++ b/components/others/Home/Gallery.js @@ -0,0 +1,228 @@ +// import React, { Component } from 'react'; +// import Masonry from 'react-masonry-component'; +// import Link from 'next/link'; + +// const masonryOptions = { +// transitionDuration: 0 +// }; + +// export class Projects extends Component { +// render() { +// const images = this.props.images.map((image, idx) => { +// return ( +//
    +//
    +// portfolio-image + +//
    +// {image.category} +//

    {image.title}

    +//
    + +// +// +// +//
    +//
    +// ) +// }) +// return ( +//
    +//
    +//
    +//

    Our Latest Projects

    +//

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +//
    + +// +// {images} +// +//
    +//
    +// ); +// } +// } + +// Projects.defaultProps = { +// images: [ +// { +// image: "/images/Home/gallery/1.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/2.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/3.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/4.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/5.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/6.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/7.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/8.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// { +// image: "/images/Home/gallery/9.jpg", +// category: "Marketing", +// title: "Marketing & Reporting" +// }, +// ] +// } + +// export default Projects; + +import React from 'react'; +import Link from 'next/link'; +import dynamic from 'next/dynamic'; +const OwlCarousel = dynamic(import('react-owl-carousel3')); + +const options = { + loop: true, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + margin: 30, + autoplayTimeout: 5000, + responsive: { + 0:{ + items: 1, + }, + 576:{ + items: 2, + }, + 768:{ + items: 2, + }, + 1024:{ + items: 3, + }, + 1200:{ + items: 4, + } + }, +} + +const Projects = ({galleries}) => { + + const images = galleries.map((data, index) => { + return ( +
    + image +
    + ); + }); + + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( + + ); +} + +export default Projects; \ No newline at end of file diff --git a/components/others/Home/IndustriesWeServe.js b/components/others/Home/IndustriesWeServe.js new file mode 100644 index 0000000..966fecb --- /dev/null +++ b/components/others/Home/IndustriesWeServe.js @@ -0,0 +1,36 @@ +import React from 'react'; +import Link from 'next/link'; + +const IndustriesWeServe = ({industries}) => { + const Industry = industries.map((data,index)=>{ + return ( +
    +
    +
    + {data.attributes.Name} +
    +
    + ); + }); + return ( +
    +
    +
    +

    Sektor Industri

    +
    +

    Kami melayani berbagai macam sektor industri, antara lain

    +
    + +
    + {Industry} +
    +
    + +
    + image +
    +
    + ) +} + +export default IndustriesWeServe; \ No newline at end of file diff --git a/components/others/Home/MainBanner.js b/components/others/Home/MainBanner.js new file mode 100644 index 0000000..816ed0b --- /dev/null +++ b/components/others/Home/MainBanner.js @@ -0,0 +1,76 @@ +import React from 'react'; +import { Link as LinkScroll } from 'react-scroll' +import Link from 'next/link'; +import dynamic from 'next/dynamic'; + + + + +const MainBanner = ({main_banner,news}) => { + const Main_Banner = (main_banner && main_banner.length > 0)?( +
    +
    +

    {main_banner[0].attributes.Contents.data[0].attributes.Title}

    +

    {main_banner[0].attributes.Contents.data[0].attributes.Description}

    + + + Get Started + +
    +
    + ):( +
    +
    +

    Selamat Datang di Thamrin Group

    +

    Thamrin Group adalah perusahaan terkemuka di Sumatera Selatan & Bengkulu dengan fokus bisnis pada sektor otomotif dan properti.

    + + + Get Started + +
    +
    + ); + const News = (news && news.length >0)?news[0].attributes.Contents.data.map((data)=>{ + return ( + +
    +
    +

    {data.attributes.Title}

    +
    +
    + + ); + }):""; + const OwlCarousel = dynamic(import('react-owl-carousel3')); + const options = { + center:false, + loop: false, + nav: false, + dots: true, + autoplay: true, + smartSpeed: 1000, + margin: 0, + autoplayTimeout: 5000, + autoWidth:false, + responsive: { + 0:{ + items: 1, + }, + }, + } + return ( +
    + + {Main_Banner} + {News} + +
    + ) +} + +export default MainBanner; \ No newline at end of file diff --git a/components/others/Home/NavBar.js b/components/others/Home/NavBar.js new file mode 100644 index 0000000..219cf2f --- /dev/null +++ b/components/others/Home/NavBar.js @@ -0,0 +1,180 @@ +import React, { useState } from "react"; +import { Link as LinkScroll} from 'react-scroll' +import Link from 'next/link'; + +// import Link from '@/utils/ActiveLink'; +import * as Icon from 'react-feather'; + +const Header = ({sticky}) => { + const [menu, setMenu] = React.useState(true) + + const toggleNavbar = () => { + setMenu(!menu) + } + + React.useEffect(() => { + let elementId = document.getElementById("header"); + if(!(sticky||false)){ + document.addEventListener("scroll", () => { + if (window.scrollY > 170) { + elementId.classList.add("is-sticky"); + } else { + elementId.classList.remove("is-sticky"); + } + }); + } + else{ + elementId.classList.add("is-sticky"); + } + window.scrollTo(0, 0); + }) + + const classOne = menu ? 'collapse navbar-collapse' : 'collapse navbar-collapse show'; + const classTwo = menu ? 'navbar-toggler navbar-toggler-right collapsed' : 'navbar-toggler navbar-toggler-right'; + + return ( + + ); +} + +export default Header; \ No newline at end of file diff --git a/components/others/Home/TeamStyleTwo.js b/components/others/Home/TeamStyleTwo.js new file mode 100644 index 0000000..6618699 --- /dev/null +++ b/components/others/Home/TeamStyleTwo.js @@ -0,0 +1,185 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const TeamStyleTwo = () => { + return ( +
    +
    +
    +

    Thamrin Group Founders

    +
    +

    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    +
    + +
    +
    +
    +
    + image +
    + +
    +
    +

    Josh Buttler

    + CEO & Founder +
    + +
      +
    • + + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    + +

    Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

    +
    +
    +
    + +
    +
    +
    + image +
    + +
    +
    +

    Alex Maxwel

    + CEO & Founder +
    + +
      +
    • + + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    + +

    Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

    +
    +
    +
    + +
    +
    +
    + image +
    + +
    +
    +

    Janny Cotller

    + CEO & Founder +
    + +
      +
    • + + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    + +

    Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

    +
    +
    +
    + +
    +
    +
    + image +
    + +
    +
    +

    Jason Statham

    + CEO & Founder +
    + +
      +
    • + + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    + +

    Risus commodo viverra maecenas accumsan lacus vel facilisis quis ipsum.

    +
    +
    +
    +
    +
    +
    + ) +} + +export default TeamStyleTwo; \ No newline at end of file diff --git a/components/others/Sales/Sales.js b/components/others/Sales/Sales.js new file mode 100644 index 0000000..ae33ffd --- /dev/null +++ b/components/others/Sales/Sales.js @@ -0,0 +1,79 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +const Sales = function ({ company, sales, ...props }) { + + const DataSales = sales.map((data) => { + return ( +
    +
    + image + +
    +
    + {(data.Name)?(data.Name.length>20)?data.Name.substring(0,20):data.Name:''}
    + Sales Consultant +
    +
      +
    • +
      {data.Telp}
      +
    • +
    +
      +
    • + +
    • +
    • + + +
    • +
    + {/*
      +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    • + + + +
    • +
    */} +

    + + Details + +
    +
    +
    + ) + }) + return ( +
    +
    +
    +

    Mercedes Benz Sales

    +
    +
    + +
    + {DataSales} +
    +
    +
    + ) +} + +export default Sales; \ No newline at end of file diff --git a/components/others/Sales/Sales_Detail.js b/components/others/Sales/Sales_Detail.js new file mode 100644 index 0000000..0c5ae36 --- /dev/null +++ b/components/others/Sales/Sales_Detail.js @@ -0,0 +1,98 @@ +import React from 'react'; +import Link from 'next/link'; +import * as Icon from 'react-feather'; + +import { FaWhatsapp } from "react-icons/fa"; +import { FaRegEnvelope } from "react-icons/fa"; +import { FaPhoneAlt } from "react-icons/fa"; + +const Sales = function ({ backend, sales, ...props }) { + + const DataSales = sales.map((data) => { + return ( +
    + + + + + +
    +
    + image + +
    +

    {data.Name}

    +

    Sales Consultant

    +
    +
    +
    + + + + + + + + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + {data.Telp}
    Mobile
    +
    + + + + {data.Email}
    Email
    +
    + + + + {data.company||''}
    Sales Consultant
    +
    + + + + thamrin.mercedes-benz.co.id
    Website
    +
    +
    + +
    + ) + }) + return ( +
    + {DataSales} +
    + ) +} + +export default Sales; \ No newline at end of file diff --git a/components/others/Shop/AddToCartBtn.js b/components/others/Shop/AddToCartBtn.js new file mode 100644 index 0000000..b2c8ae1 --- /dev/null +++ b/components/others/Shop/AddToCartBtn.js @@ -0,0 +1,28 @@ +import React from 'react' +import Link from 'next/link' +import { useToasts } from 'react-toast-notifications' +import { useDispatch } from 'react-redux' + +const AddToCartBtn = ({ id }) => { + // console.log(id) + const { addToast } = useToasts() + const dispatch = useDispatch() + + const addToCart = () => { + dispatch({ + type: 'ADD_TO_CART', + id + }) + addToast('Cart Added Successfully', { appearance: 'success' }) + } + return ( + + { + e.preventDefault(); + addToCart() + }} className="add-to-cart-btn">Add to Cart + + ) +} + +export default AddToCartBtn diff --git a/components/others/Shop/ProductCard.js b/components/others/Shop/ProductCard.js new file mode 100644 index 0000000..7c2000e --- /dev/null +++ b/components/others/Shop/ProductCard.js @@ -0,0 +1,112 @@ +import React from 'react' +import Link from 'next/link' +import * as Icon from 'react-feather' +import { useSelector } from 'react-redux' +import AddToCartBtn from './AddToCartBtn' + +const ProductCard = () => { + const products = useSelector((state) => state.products) + + // console.log(products) + + return ( +
    +
    +
    +
    +
    +
    +

    Showing 1-8 of 14 results

    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + + {products.map(product => ( +
    +
    +
    + {product.name} + + +
    + +
    +

    + + {product.name} + +

    + ${product.price} +
      +
    • +
    • +
    • +
    • +
    • +
    + + +
    +
    +
    + ))} + + {/* Pagination */} +
    +
    + +
    +
    +
    +
    +
    + ) +} + +export default ProductCard; \ No newline at end of file diff --git a/components/others/Shop/ProductSlider.js b/components/others/Shop/ProductSlider.js new file mode 100644 index 0000000..0e6e3fe --- /dev/null +++ b/components/others/Shop/ProductSlider.js @@ -0,0 +1,42 @@ +import React from 'react' +import dynamic from 'next/dynamic' +const OwlCarousel = dynamic(import('react-owl-carousel3')) + +const options = { + loop: true, + nav: true, + dots: false, + autoplay: true, + items: 1, + smartSpeed: 1000, + autoplayTimeout: 5000, + navText: [ + "", + "" + ], +}; + +const ProductSlider = ({ images }) => { + const [display, setDisplay] = React.useState(false); + + React.useEffect(() => { + setDisplay(true); + }, []) + + return ( + <> + {display ? + {images && images.map((img, idx) => ( +
    + img +
    + ))} +
    : ''} + + ) +} + +export default ProductSlider; \ No newline at end of file diff --git a/components/others/Shop/ProductsDetailsTabs.js b/components/others/Shop/ProductsDetailsTabs.js new file mode 100644 index 0000000..1f383ee --- /dev/null +++ b/components/others/Shop/ProductsDetailsTabs.js @@ -0,0 +1,82 @@ +import React from 'react'; +import { resetIdCounter, Tab, Tabs, TabList, TabPanel } from 'react-tabs'; +resetIdCounter(); + +const ProductsDetailsTabs = () => { + return ( +
    + + + Description + Additional Information + Review + + + +
    +

    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry’s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. Lorem Ipsum is simply dummy text of the printing.

    +
    +
    + + +
    +
      +
    • Brand ThemeForest
    • +
    • Color Brown
    • +
    • Size Large, Medium
    • +
    • Weight 27 kg
    • +
    • Dimensions 16 x 22 x 123 cm
    • +
    +
    +
    + + +
    +

    Customer Reviews

    +

    There are no reviews yet.

    + +
    +

    Rate this item:

    + +
    + + + + + + +

    Very good product!

    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    + ) +} + +export default ProductsDetailsTabs; \ No newline at end of file diff --git a/components/others/Shop/QuickViewModal.js b/components/others/Shop/QuickViewModal.js new file mode 100644 index 0000000..3249395 --- /dev/null +++ b/components/others/Shop/QuickViewModal.js @@ -0,0 +1,58 @@ +import React from 'react'; +import * as Icon from 'react-feather'; + +const QuickViewModal = () => { + return ( +
    +
    +
    + + +
    +
    +
    + image +
    +
    + +
    +
    +

    Wood Pencil

    + +
    + $200.00 $191.00 +
    +

    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.

    + +
    +
    +
    + + + + + + + +
    +
    + + +
    + +
    + Category: Pencil + Tag: Prints +
    +
    +
    +
    +
    +
    +
    + ) +} + +export default QuickViewModal; \ No newline at end of file diff --git a/config/apollo-config.js b/config/apollo-config.js new file mode 100644 index 0000000..c6d9e29 --- /dev/null +++ b/config/apollo-config.js @@ -0,0 +1,6 @@ +// Apollo Value Configuration +const ApolloConfig = { + graphql_uri: process.env.NEXT_PUBLIC_API_GRAPHQL_URI, +}; + +export default ApolloConfig; diff --git a/config/backend-config.js b/config/backend-config.js new file mode 100644 index 0000000..6e5b86d --- /dev/null +++ b/config/backend-config.js @@ -0,0 +1,7 @@ +//Backend Value Configuration +const BackendConfig = { + uri: process.env.BACKEND_SERVER_URI, + // captcha: process.env.CAPTCHA_CLIENT_KEY, +}; + +export default BackendConfig; \ No newline at end of file diff --git a/ecosystem.config.js b/ecosystem.config.js new file mode 100644 index 0000000..cb4ad73 --- /dev/null +++ b/ecosystem.config.js @@ -0,0 +1,16 @@ +const path = require("path"); +require("dotenv").config({ path: path.join(__dirname, ".env") }); + +module.exports = { + apps: [ + { + name: "tbg-frontend-web", + script: "index.js", + time: true, + env: { + NODE_ENV: "development", + }, + env_production: process.env, + }, + ], +}; diff --git a/env-example b/env-example new file mode 100644 index 0000000..c099582 --- /dev/null +++ b/env-example @@ -0,0 +1,5 @@ +NEXT_PUBLIC_API_GRAPHQL_URI=#STRAPI URL#/graphql +BACKEND_SERVER_URI =#STRAPI URL# + +PORT=#PORT# +NODE_ENV = production \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..2e7cbf8 --- /dev/null +++ b/index.js @@ -0,0 +1,55 @@ +const { createServer } = require("http"); +const express = require('express') + +const { parse } = require("url"); +const next = require("next"); +const { createProxyMiddleware } = require('http-proxy-middleware'); + +const cli = require("next/dist/cli/next-start"); + +const dev = process.env.NODE_ENV !== "production"; +const app = next({ dev }); +const handle = app.getRequestHandler(); +// require("dotenv").config(); + +console.log(process.env.PORT); +const port = process.env.PORT || "14011"; + + +app.prepare().then(() => { + + // const server = createServer((req, res) => { + // const parsedUrl = parse(req.url, true); + // const { pathname,query } = parsedUrl; + // if(pathname=='/index.html.var'){ + // app.render(req, res, "/home", query); + // } + // // if (pathname === "/") { + // // console.log("=>",parsedUrl); + // // } + // // if(!pathname.includes('api/util')){ + // // if(pathname.includes('/product')){ + // // var company = pathname.substring(1,pathname.lastIndexOf('/product')); + // // if(company.length>1)parsedUrl.query = {'company':company,...parsedUrl.query}; + // // } + // // console.log("rendering..",pathname); + // // } + // else handle(req, res, parsedUrl); + // }); + const server = express(); + + server.use( + '/uploads', + createProxyMiddleware({ + target: process.env.BACKEND_SERVER_URI, + changeOrigin: true, + }), + ); + + server.all('*', (req, res) => handle(req, res)); + + server.listen(port, (err) => { + if (err) throw err; + console.log(`Ready on port ${port}`); + }); +}); diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..5995ee5 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/components/*": ["components/*"], + "@/utils/*": ["utils/*"], + "@/public/*": ["public/*"], + "@/api/*": ["api/*"], + "@/lib/*": ["lib/*"], + "@/config/*": ["config/*"] + } + } +} \ No newline at end of file diff --git a/lib/apollo.js b/lib/apollo.js new file mode 100644 index 0000000..bc819fa --- /dev/null +++ b/lib/apollo.js @@ -0,0 +1,95 @@ +import { + ApolloClient, + InMemoryCache, + gql, + ApolloLink, + concat, + // useQuery, + // createHttpLink, + HttpLink +} from "@apollo/client"; +import ApolloConfig from "../config/apollo-config"; +// import fetch from "cross-fetch"; + +function errorHandler(object) { + return object.graphQLErrors.length != 0 + ? object.graphQLErrors[0].message + : object.networkError && object.networkError.result + ? object.networkError.result.errors.join(" ; ") + : object.networkError + ? object.networkError[Object.keys(object.networkError)[0]].toString() + : "Fetch failed"; +} + +function initApollo(token) { + // const httpLink = createHttpLink({ + // uri: ApolloConfig.graphql_uri, + // fetch: fetch, + // headers: + // token != "" + // ? { + // Authorization: `Bearer ${token}`, + // } + // : null, + // }); + const httpLink = new HttpLink({ uri: ApolloConfig.graphql_uri }); + + const authMiddleware = new ApolloLink((operation, forward) => { + operation.setContext(({ headers = {} }) => token == ""?headers:({ + headers: { + ...headers, + Authorization: `Bearer ${token}`, + } + })); + return forward(operation); + }) + + return new ApolloClient({ + cache: new InMemoryCache({ + addTypename: false, + }), + link: concat(authMiddleware, httpLink), + }); +} + +async function query(query, token = "", variables = {}, cache = false) { + const client = initApollo(token); + var res; + try { + var sql = await client.query({ + query: gql` + ${query} + `, + variables: variables, + fetchPolicy: cache ? "cache-first" : "no-cache", + }); + res = { STATUS: 1, DATA: sql.data }; + } catch (e) { + console.log(e.message); + res = { STATUS: 0, DATA: e.message }; + } + return res; +} + +async function mutation(mutation, token = "", variables = {}) { + const client = initApollo(token); + var res; + try { + var sql = await client.mutate({ + mutation: gql` + ${mutation} + `, + variables: variables, + }); + res = { STATUS: 1, DATA: sql.data }; + } catch (e) { + console.log(e.message); + res = { STATUS: 0, DATA: e.message }; + } + return res; +} + +module.exports = { + query: query, + mutation: mutation, +}; diff --git a/lib/ga/index.js b/lib/ga/index.js new file mode 100644 index 0000000..9752245 --- /dev/null +++ b/lib/ga/index.js @@ -0,0 +1,11 @@ +// log the pageview with their URL +export const pageview = (url) => { + window.gtag('config', process.env.NEXT_PUBLIC_GOOGLE_ANALYTICS, { + page_path: url, + }) +} + +// log specific events happening. +export const event = ({ action, params }) => { + window.gtag('event', action, params) +} \ No newline at end of file diff --git a/lib/util.js b/lib/util.js new file mode 100644 index 0000000..87f3881 --- /dev/null +++ b/lib/util.js @@ -0,0 +1,10 @@ +const parse = require('html-react-parser'); + +module.exports = { + htmlParse : function(html){ + if(html){ + return parse(html.replace(/\n/g,'
    ')); + } + else ''; + } +} \ No newline at end of file diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..b05e6ed --- /dev/null +++ b/next.config.js @@ -0,0 +1,12 @@ +const path = require('path') +module.exports = { + sassOptions: { + includePaths: [path.join(__dirname, 'styles')], + }, + trailingSlash: true, + i18n: { + locales: ['en', 'ar'], + defaultLocale: 'en', + }, + productionBrowserSourceMaps: true, +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..3f2e083 --- /dev/null +++ b/package.json @@ -0,0 +1,58 @@ +{ + "name": "startp", + "version": "3.2.0", + "description": "Thamrin Group", + "main": "index.js", + "scripts": { + "dev": "next dev", + "build": "next build", + "export": "next export", + "start": "next start" + }, + "author": "EnvyTheme.com", + "dependencies": { + "@apollo/client": "^3.3.11", + "animate.css": "^4.1.1", + "axios": "^0.21.1", + "cookies": "^0.8.0", + "cross-fetch": "^3.1.4", + "dotenv": "^10.0.0", + "firebase": "^9.5.0", + "firebase-tools": "^9.23.0", + "graphql": "^15.6.1", + "html-react-parser": "^1.4.8", + "http-proxy-middleware": "^2.0.6", + "midtrans-client": "^1.2.5", + "next": "^10.0.7", + "nodemailer": "^6.5.0", + "nodemailer-sendgrid-transport": "^0.2.0", + "path": "^0.12.7", + "pm2": "^5.1.2", + "react": "^17.0.1", + "react-accessible-accordion": "^3.3.4", + "react-dom": "^17.0.1", + "react-feather": "^2.0.9", + "react-firebaseui": "^6.0.0", + "react-hook-form": "^6.15.4", + "react-html-parser": "^2.0.2", + "react-icons": "^4.3.1", + "react-masonry-component": "^6.2.1", + "react-number-format": "^4.7.3", + "react-owl-carousel3": "^2.2.5", + "react-query": "^3.34.4", + "react-redux": "^7.1.0", + "react-scroll": "^1.8.4", + "react-select": "^5.2.1", + "react-slick": "^0.28.0", + "react-tabs": "^3.2.0", + "react-toast-notifications": "^2.4.3", + "redux": "^3.6.0", + "redux-devtools-extension": "^2.13.2", + "request-promise": "^4.2.6", + "sass": "^1.32.7", + "sweetalert": "^2.1.2", + "sweetalert2": "^10.15.5", + "sweetalert2-react-content": "^3.3.1" + }, + "license": "MIT" +} diff --git a/pages/404.js b/pages/404.js new file mode 100644 index 0000000..2ac42fe --- /dev/null +++ b/pages/404.js @@ -0,0 +1,28 @@ +import React from 'react' +import Link from 'next/link' + +const Custom404 = () => { + return ( +
    +
    +
    +
    +
    +
    +

    Oops!

    +
    +

    404 - Page not found

    +

    The page you are looking for might have been removed had its name changed or is temporarily unavailable.

    + + + Go to Homepage + +
    +
    +
    +
    +
    + ) +} + +export default Custom404 \ No newline at end of file diff --git a/pages/Carrer/index.js b/pages/Carrer/index.js new file mode 100644 index 0000000..446f79f --- /dev/null +++ b/pages/Carrer/index.js @@ -0,0 +1,42 @@ +import React from 'react'; +import Navbar from "@/components/_App/Navbar"; +import Footer from "@/components/_App/Footer"; +import PageBanner from '@/components/Common/PageBanner'; +import LatestNews from '@/components/Company/LatestNews/LatestNews'; + + +const News = function ({ backend, news, othernews, ...props }) { + return ( + <> + + + + + + +