iceholidays-frontend 0.11.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff4468b5bb9777f1aa1b907f832ae75fc918847e5c721bc3bbf434a56d2bb11c
4
- data.tar.gz: 3bbc05e5a116b40f46291d072497fd315b445e1ebb5c382dcf7a82083a1e4a45
3
+ metadata.gz: a3ec38ae7c3d23dd0728bb4db5695e9ce2a59be9d3ec5b4318b57b2bdef2883d
4
+ data.tar.gz: 786da9eb7f5a1242153cb409a080dec4645ab22040dd0efd1af221b130fa279e
5
5
  SHA512:
6
- metadata.gz: 41b36ae9c5787a229e9dabf1c7a02434dbf7dddb7f662fb6d2ec7601b3e6139aa1ac5d4e973cacfdefce3b66f1af9c810609f4159a38e2aaf0ae0eaa98051f70
7
- data.tar.gz: de17d34551a35097c3e11dcd957ea0ce29199c6f07054ac8af0ba5c61dcbdbc1691198d83d41a89c7f4d5eaa0b8f59a921562e634df133483358ea812d1acd42
6
+ metadata.gz: 50e8ad6881de2f85f52f003517f290beabb02725320821b689236fa31cc144115d9317f6eeffe4be1cdbeac878698de10c772c29a300d8ecc4a39879cca5f951
7
+ data.tar.gz: adbae28d5c2eb0a3d1e59163d21e11913592b52b45f5b2e78ade3f2f363a64e67cb81a92bc38e908a9fb54eab02b921ad4276ae67ccbac061ee7acdee3b19991
@@ -128,4 +128,19 @@ a{
128
128
  // .ant-menu-submenu-selected>.ant-menu-submenu-title{
129
129
  // color: #FFFFFF !important;
130
130
  // }
131
+ }
132
+
133
+ .ant-float-btn-default{
134
+ background-color: #F2F2F280;
135
+ width: 42px;
136
+ height: 42px;
137
+ border-radius: 50px;
138
+ }
139
+
140
+ .ant-float-btn .ant-float-btn-body .ant-float-btn-content .ant-float-btn-icon{
141
+ width: 32px;
142
+
143
+ svg{
144
+ color: $primary-color;
145
+ }
131
146
  }
@@ -8,7 +8,8 @@ class ContactUsApi
8
8
 
9
9
  return axios.post(apiUrl, {inquiry: formValues})
10
10
  .then(response => {
11
- return Promise.resolve(null);
11
+ const ok = response.status == 200;
12
+ return Promise.resolve(ok);
12
13
  });
13
14
  }
14
15
 
@@ -2,4 +2,19 @@
2
2
  import "./react"
3
3
  //= require jquery3
4
4
  //= require popper
5
- //= require bootstrap
5
+ //= require bootstrap
6
+
7
+ import '@ant-design/v5-patch-for-react-19';
8
+
9
+ import { unstableSetRender } from 'antd';
10
+ import { createRoot } from 'react-dom/client';
11
+
12
+ unstableSetRender((node, container) => {
13
+ container._reactRoot ||= createRoot(container);
14
+ const root = container._reactRoot;
15
+ root.render(node);
16
+ return async () => {
17
+ await new Promise((resolve) => setTimeout(resolve, 0));
18
+ root.unmount();
19
+ };
20
+ });
@@ -1,8 +1,10 @@
1
1
  import React from "react";
2
2
  import { Outlet } from "react-router-dom";
3
- import { Layout } from 'antd';
3
+ import { FloatButton, Layout } from 'antd';
4
4
  import MainHeader from "./MainHeader";
5
5
  import MainFooter from "./MainFooter";
6
+ import { mdiArrowUpBold } from "@mdi/js";
7
+ import Icon from "@mdi/react";
6
8
 
7
9
  const { Content } = Layout;
8
10
 
@@ -12,6 +14,7 @@ const MainLayout = () => {
12
14
  <MainHeader/>
13
15
  <Content>
14
16
  <Outlet/>
17
+ <FloatButton.BackTop icon={<Icon path={mdiArrowUpBold} size="32px" />}/>
15
18
  </Content>
16
19
  {/* <MainFooter/> */}
17
20
  </Layout>
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Headline from "../components/shared/Headline";
3
- import { Button, Col, Flex, Form, Input, notification, Row, Select, Space } from "antd";
4
- import { mdiFacebook, mdiInstagram, mdiTwitter, mdiWhatsapp, mdiYoutube } from "@mdi/js";
3
+ import { Button, Col, Flex, Form, FormInstance, Input, notification, Row, Select, Space } from "antd";
4
+ import { mdiFacebook, mdiInstagram, mdiWhatsapp } from "@mdi/js";
5
5
  import Icon from "@mdi/react";
6
6
  import ContactUsApi from "../../api-services/contact-us-api.service";
7
7
  const { TextArea } = Input;
@@ -27,6 +27,7 @@ const validateMessages = {
27
27
 
28
28
  export default class ContactUsPage extends React.Component {
29
29
  api = new ContactUsApi;
30
+ contactForm = React.createRef<FormInstance>();
30
31
 
31
32
  state = {
32
33
  states: []
@@ -45,8 +46,11 @@ export default class ContactUsPage extends React.Component {
45
46
 
46
47
  submitForm(formValues) {
47
48
  this.api.contactInquiry(formValues)
48
- .then(_ => {
49
- notification.success({message: "Inquiry sent."})
49
+ .then(success => {
50
+ if(success){
51
+ notification['success']({message: "Inquiry sent."});
52
+ this.contactForm.current?.resetFields();
53
+ }
50
54
  })
51
55
  .catch(error => {
52
56
  notification.error({ message: 'An error occured while sending inquiry.'});
@@ -67,6 +71,7 @@ export default class ContactUsPage extends React.Component {
67
71
  <span>Send us your enquiry</span>
68
72
  </div>
69
73
  <Form
74
+ ref={this.contactForm}
70
75
  autoComplete="off"
71
76
  layout="vertical"
72
77
  variant="filled"
@@ -112,7 +112,7 @@ class ShowPage extends React.Component <{params;}> {
112
112
  })
113
113
  .finally(()=>this.setState({loading: false}))
114
114
  .catch(error => {
115
- notification.error({ message: 'An error occured while loading countries.'});
115
+ notification.error({ message: 'An error occured while loading itinerary.'});
116
116
  });
117
117
 
118
118
  this.getAgents();
@@ -1,5 +1,5 @@
1
1
  module Iceholidays
2
2
  module Frontend
3
- VERSION = "0.11.0"
3
+ VERSION = "0.12.0"
4
4
  end
5
5
  end
@@ -348,6 +348,20 @@ a {
348
348
  text-transform: uppercase;
349
349
  }
350
350
 
351
+ .ant-float-btn-default {
352
+ background-color: rgba(242, 242, 242, 0.5019607843);
353
+ width: 42px;
354
+ height: 42px;
355
+ border-radius: 50px;
356
+ }
357
+
358
+ .ant-float-btn .ant-float-btn-body .ant-float-btn-content .ant-float-btn-icon {
359
+ width: 32px;
360
+ }
361
+ .ant-float-btn .ant-float-btn-body .ant-float-btn-content .ant-float-btn-icon svg {
362
+ color: #DCB062;
363
+ }
364
+
351
365
  .slick-track {
352
366
  margin: unset;
353
367
  }