-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added: Show orders in user page(#96).
- Loading branch information
1 parent
f76e487
commit f1aedd0
Showing
137 changed files
with
2,024 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.vscode/ | ||
.idea/ | ||
node_modules/ | ||
dist/ | ||
temp/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
radiomag-client-vue/src/components/BulletinComponent/Bulletin.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
57 changes: 57 additions & 0 deletions
57
radiomag-client-vue/src/components/ImageShowBigComponent/ImageShowBigComponent.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { describe, it, expect, beforeEach } from "vitest"; | ||
import { shallowMount } from "@vue/test-utils"; | ||
import { createTestingPinia } from "@pinia/testing"; | ||
import { ImageShowBig } from "."; | ||
|
||
const plugins = [createTestingPinia()]; | ||
|
||
const mocks = { | ||
store: { | ||
isVisible: true, | ||
data: { | ||
src: "/images/product/1347", | ||
alt: "1n4007", | ||
}, | ||
}, | ||
}; | ||
|
||
const global = { | ||
plugins, | ||
mocks, | ||
}; | ||
|
||
const options = { | ||
global, | ||
}; | ||
|
||
const buildWrapper = (opt: typeof options) => { | ||
return shallowMount(ImageShowBig, opt); | ||
}; | ||
|
||
let wrapper = buildWrapper(options); | ||
|
||
beforeEach(() => { | ||
wrapper = buildWrapper(options); | ||
}); | ||
|
||
describe("ImageShowBig component", () => { | ||
it("should be visible", () => { | ||
expect(wrapper.isVisible()).toBe(true); | ||
}); | ||
|
||
it("should have image", () => { | ||
expect(wrapper.find("img").exists()).toBe(true); | ||
}); | ||
|
||
it("image should have src", () => { | ||
expect(wrapper.find("img").attributes()["src"]).toEqual( | ||
mocks.store.data.src | ||
); | ||
}); | ||
|
||
it("image should have alt", () => { | ||
expect(wrapper.find("img").attributes()["alt"]).toEqual( | ||
mocks.store.data.alt | ||
); | ||
}); | ||
}); |
3 changes: 3 additions & 0 deletions
3
radiomag-client-vue/src/components/ImageShowBigComponent/ImageShowBigComponent.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template src="./template.html"></template> | ||
<style lang="scss" src="./style.scss"></style> | ||
<script lang="ts" src="./script.ts"></script> |
1 change: 1 addition & 0 deletions
1
radiomag-client-vue/src/components/ImageShowBigComponent/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as ImageShowBig } from "./ImageShowBigComponent.vue"; |
16 changes: 16 additions & 0 deletions
16
radiomag-client-vue/src/components/ImageShowBigComponent/script.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineComponent } from "vue"; | ||
import { useImageShow } from "@/store/imageShow"; | ||
|
||
export default defineComponent({ | ||
setup() { | ||
const store = useImageShow(); | ||
const closeWindow = () => { | ||
return store.hide(); | ||
}; | ||
|
||
return { | ||
store, | ||
closeWindow, | ||
}; | ||
}, | ||
}); |
22 changes: 22 additions & 0 deletions
22
radiomag-client-vue/src/components/ImageShowBigComponent/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.image-show-big { | ||
position: fixed; | ||
background-color: var(--color-black-light-alpha); | ||
top: 0; | ||
left: 0; | ||
right: 0; | ||
bottom: 0; | ||
z-index: 9999; | ||
padding-top: 10vmin; | ||
|
||
@media (max-width: $breakpoint-mobile) { | ||
padding-top: 50vmin; | ||
} | ||
|
||
&__image { | ||
display: block; | ||
margin: auto; | ||
max-width: 80vmin; | ||
height: auto; | ||
object-fit: contain; | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
radiomag-client-vue/src/components/ImageShowBigComponent/template.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<div class="image-show-big" v-if="store.isVisible" @click="closeWindow"> | ||
<img | ||
class="image-show-big__image" | ||
:src="store.data.src" | ||
:alt="store.data.alt" | ||
/> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 7 additions & 3 deletions
10
...mag-client-vue/src/components/OrderContactFormComponent/OrderContactFormComponent.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
radiomag-client-vue/src/components/OrderContactFormComponent/functions/components.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.