Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/minor fixes 1 #138

Merged
merged 9 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
.next/
.next/
.idea
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ COPY --from=BUILD_IMAGE /app/lib/seeder.js ./lib/seeder.js
EXPOSE 5050
CMD ["yarn", "start"]

#docker run --rm -it -p 5050:5050/tcp --env="OPENAI_SECRET_KEY=zyudofadsfkj" yobulkdev:latest
#docker run --rm -it -p 5050:5050/tcp --env="OPENAI_SECRET_KEY=zyudofadsfkj" yobulkdev:latest
9 changes: 0 additions & 9 deletions components/dataviewer/AutoFixModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ const AutoFixModal = ({ isOpen, closeModal, columnDefs, runAutofix, autofixValue
<table className="min-w-full divide-y divide-gray-200">
<thead className="bg-gray-50">
<tr>
{/* <th
scope="col"
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
>
Column Name
</th> */}
<th
scope="col"
className="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider"
Expand All @@ -85,9 +79,6 @@ const AutoFixModal = ({ isOpen, closeModal, columnDefs, runAutofix, autofixValue
if (autofixValues.filter(e => e.field === item).length > 0) {
return (
<tr key={_idx}>
{/* <td className="px-6 py-4 whitespace-nowrap">
<p className="text-sm text-gray-900">{item?.key}</p>
</td> */}
<td className="px-6 py-4 whitespace-nowrap">
<p className="text-sm text-gray-900">
{item}
Expand Down
6 changes: 3 additions & 3 deletions components/dataviewer/SuccessModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ export default function SuccessModal({ submit, message }) {
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
strokeWidth="1.5"
stroke="currentColor"
className="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
strokeLinecap="round"
strokeLinejoin="round"
d="M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.96 5.96a14.926 14.926 0 01-5.841 2.58m-.119-8.54a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 00-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 01-2.448-2.448 14.9 14.9 0 01.06-.312m-2.24 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"
/>
</svg>
Expand Down
6 changes: 3 additions & 3 deletions components/dataviewer/happyModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export default function SuccessModal({ isVisible, setIsVisible }) {
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
strokeWidth="1.5"
stroke="currentColor"
className="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
strokeLinecap="round"
strokeLinejoin="round"
d="M15.59 14.37a6 6 0 01-5.84 7.38v-4.8m5.84-2.58a14.98 14.98 0 006.16-12.12A14.98 14.98 0 009.631 8.41m5.96 5.96a14.926 14.926 0 01-5.841 2.58m-.119-8.54a6 6 0 00-7.381 5.84h4.8m2.581-5.84a14.927 14.927 0 00-2.58 5.84m2.699 2.7c-.103.021-.207.041-.311.06a15.09 15.09 0 01-2.448-2.448 14.9 14.9 0 01.06-.312m-2.24 2.39a4.493 4.493 0 00-1.757 4.306 4.493 4.493 0 004.306-1.758M16.5 9a1.5 1.5 0 11-3 0 1.5 1.5 0 013 0z"
/>
</svg>
Expand Down
6 changes: 2 additions & 4 deletions components/dataviewer/reviewCsv.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ const ReviewCsv = ({
onChange={handleSwitch}
className="ml-2 mt-1"
>
<button
<div
className={`${onlyError ? 'bg-blue-500' : 'bg-gray-200'
} relative inline-flex h-6 w-11 items-center rounded-full`}
>
<span
className={`${onlyError ? 'translate-x-6' : 'translate-x-1'
} inline-block h-4 w-4 transform rounded-full bg-white transition`}
/>
</button>
</div>
</Switch>
</div>{' '}
<div className="flex-auto w-auto font-semibold">
Expand All @@ -164,7 +164,6 @@ const ReviewCsv = ({
className={`flex float-right bg-transparent h-8 px-2 py-1 m-2 text-sm hover:bg-blue-500 text-blue-700 font-semibold hover:text-white border border-blue-500 hover:border-transparent rounded ml-auto ${loadingSuggestions && 'text-white border-none bg-blue-200 hover:bg-blue-200'}`}
disabled={loadingSuggestions}
>
{/* <CloudArrowDownIcon className="w-5 mr-1" /> */}
{loadingSuggestions ? 'Getting suggestions...' : 'Get YoBulkAI Suggestions'}
</button>}
<div className="flex justify-end">
Expand Down Expand Up @@ -227,7 +226,6 @@ const ReviewCsv = ({
onClick={() => onBtnSubmit()}
className="flex float-right bg-transparent h-8 px-2 py-1 m-2 text-sm hover:bg-blue-500 text-blue-700 font-semibold hover:text-white border border-blue-500 hover:border-transparent rounded"
>
{/* <CloudArrowDownIcon className="w-5 mr-1" /> */}
Submit
</button>
</div>
Expand Down
1 change: 0 additions & 1 deletion components/saasLoader/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const SaasLoader = ({ templateId }) => {
state.saasTemplateColumns?.map((column, idx) => (
<div key={idx} className="flex items-center justify-between">
<p className="text-gray-700 dark:text-gray-200 py-2">{column.label}</p>
{/* <AiOutlineInfoCircle className='w-4 h-4' /> */}
</div>
))}
</div>
Expand Down
3 changes: 0 additions & 3 deletions components/saasloadmapper/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,6 @@ const SassLoadMapper = () => {
</div>
}
</div>
{/* <div className="gap-1">
<span className="break-all">{JSON.stringify(state)}</span>
</div> */}
</div>
)}
{loading && <UploadProgress progress={progress} />}
Expand Down
13 changes: 0 additions & 13 deletions components/sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import Logo from '../../public/yobulk_logo.png';
import Image from 'next/image';

const menuItems = [
/* { id: 1, label: 'Importer', icon: HomeIcon, link: '/' },
*/
{
id: 0,
label: 'Home',
Expand Down Expand Up @@ -167,17 +165,6 @@ const Sidebar = () => {
})}
</div>
</div>

{/* <div className={`${getNavItemClasses({})} px-3 py-4`}>
<div style={{ width: '2.5rem' }}>
<LogoutIcon />
</div>
{!toggleCollapse && (
<span className={classNames('text-md font-medium text-text-light')}>
Logout
</span>
)}
</div> */}
</div>
);
};
Expand Down
4 changes: 0 additions & 4 deletions components/templates/JSON_Template.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ const JSON_Template = () => {
<Link href="/templates">
<ArrowLeftIcon className="h-5 cursor-pointer text-black dark:text-white" />
</Link>

{/* <h1 className="text-2xl font-bold text-gray-500">
{`${templateName ? templateName : 'Name your'} template`}
</h1> */}
</div>

<button
Expand Down
10 changes: 0 additions & 10 deletions components/templates/TemplateConfig/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const AdminComponent = ({ templateId, type }) => {
axios
.get('/api/templates', { headers })
.then((res) => {
console.log({templateData: res.data})
setTemplateData(res.data);
})
.catch((err) => console.log(err));
Expand Down Expand Up @@ -134,8 +133,6 @@ const AdminComponent = ({ templateId, type }) => {
});
};

console.log(templateData.columns, 'aka')

return (
<div className="p-4 dark:bg-gray-800 h-screen">
<div className="flex align-middle justify-between ">
Expand Down Expand Up @@ -290,19 +287,13 @@ const AdminComponent = ({ templateId, type }) => {
}
</div>
</div>

{/* <div className="p-4">{JSON.stringify(templateData)}</div>
*/}
{type === 'create' &&
addColumnButton({ openModal, isOpen, closeModal, setTemplateData })}

<div className="overflow-x-auto relative mt-3">
<table className="w-full bg-white text-sm text-gray-500 dark:bg-gray-800 dark:text-gray-400 table shadow-md border-2 dark:border-gray-700">
<thead className="text-xs text-white uppercase h-10 bg-blue-500">
<tr>
{/* <th scope="col" className="py-3">
Column Key
</th> */}
<th scope="col" className="py-3">
Column name
</th>
Expand Down Expand Up @@ -332,7 +323,6 @@ const AdminComponent = ({ templateId, type }) => {
key={idx}
className="h-10 text-center border-b-2 dark:border-gray-700"
>
{/* <td className="w-8">{col.key}</td> */}
<td>{col.label}</td>
<td>{col.data_type}</td>
<td>{col.example}</td>
Expand Down
5 changes: 0 additions & 5 deletions layouts/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ const Layout = ({ children }) => {
</div>
<div className="flex-1 bg-gray-100 dark:bg-gray-800">
{children}{' '}
{/* <footer className="flex bottom-0 right-1/3 text-gray-400 ">
<p className="text-center tracking-tight">
Developed with &#10084;&#65039; by YoBulk Team!
</p>
</footer> */}
</div>
</div>
</div>
Expand Down
14 changes: 0 additions & 14 deletions pages/templatecreate/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,21 +74,7 @@ const Templates = () => {
<Link href="/templates">
<ArrowLeftIcon className="h-5 cursor-pointer text-black dark:text-white" />
</Link>

{/* <h1 className="text-2xl font-bold text-gray-500">
{`${
templateName ? templateName : 'Name your'
} template`}
</h1> */}
</div>

{/* <button
type="button"
onClick={saveTemplate}
className="flex bg-white border-2 border-blue-500 text-blue-500 hover:text-white hover:bg-blue-500 focus:outline-none font-medium rounded-md gap-1 text-sm px-6 py-2 text-center mb-2"
>
<ArrowDownTrayIcon className="h-4 mr-1" /> Save Template
</button> */}
</div>
</div>

Expand Down