Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

262 rindas
5.5 KiB

  1. exports.id = 2847;
  2. exports.ids = [2847];
  3. exports.modules = {
  4. /***/ 2847:
  5. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  6. "use strict";
  7. var _apollo = _interopRequireDefault(__webpack_require__(6371));
  8. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  9. async function getTransaction(token = "") {
  10. var res = await _apollo.default.query(`
  11. query {
  12. transactions{
  13. id
  14. order_id
  15. cust_name
  16. cust_telp
  17. cust_address
  18. product_img{
  19. url
  20. }
  21. product_name
  22. product_color
  23. product_quantity
  24. product_courier
  25. product_price
  26. }
  27. }`, token);
  28. return res;
  29. }
  30. async function getTransactionUnpaid(token = "") {
  31. var res = await _apollo.default.query(`
  32. query {
  33. transactions(where: { status: "1" }){
  34. id
  35. order_id
  36. cust_name
  37. cust_telp
  38. cust_address
  39. product_img{
  40. url
  41. }
  42. product_name
  43. product_color
  44. product_quantity
  45. product_courier
  46. product_price
  47. }
  48. }`, token);
  49. return res;
  50. }
  51. async function PayTransactionUnpaid(token = "") {
  52. var res = await _apollo.default.query(`
  53. query{
  54. transactions(where: { status: "1" }){
  55. id
  56. order_id
  57. cust_name
  58. cust_telp
  59. cust_address
  60. product_img{
  61. url
  62. }
  63. product_name
  64. product_color
  65. product_quantity
  66. product_courier
  67. product_price
  68. }
  69. }
  70. `, token);
  71. return res;
  72. }
  73. async function getTransactionPrepared(token = "") {
  74. var res = await _apollo.default.query(`
  75. query {
  76. transactions(where: { status: "2" }){
  77. id
  78. order_id
  79. cust_name
  80. cust_telp
  81. cust_address
  82. product_img{
  83. url
  84. }
  85. product_name
  86. product_color
  87. product_quantity
  88. product_courier
  89. product_price
  90. }
  91. }`, token);
  92. return res;
  93. }
  94. async function getTransactionSending(token = "") {
  95. var res = await _apollo.default.query(`
  96. query {
  97. transactions(where: { status: "3" }){
  98. id
  99. order_id
  100. cust_name
  101. cust_telp
  102. cust_address
  103. product_img{
  104. url
  105. }
  106. product_name
  107. product_color
  108. product_quantity
  109. product_courier
  110. product_price
  111. }
  112. }`, token);
  113. return res;
  114. }
  115. async function getTransactionFinished(token = "") {
  116. var res = await _apollo.default.query(`
  117. query {
  118. transactions(where: { status: "4" }){
  119. id
  120. order_id
  121. cust_name
  122. cust_telp
  123. cust_address
  124. product_img{
  125. url
  126. }
  127. product_name
  128. product_color
  129. product_quantity
  130. product_courier
  131. product_price
  132. }
  133. }`, token);
  134. return res;
  135. }
  136. async function AddToCart(content, token = "") {
  137. var res = await _apollo.default.mutation(`
  138. mutation($input : CartInput!){
  139. createCart( input:{data:$input} )
  140. {
  141. cart{
  142. id
  143. }
  144. }
  145. }
  146. `, token, {
  147. input: content
  148. });
  149. return res;
  150. }
  151. async function AddToCheckout(content, token = "") {
  152. var res = await _apollo.default.mutation(`
  153. mutation($input: CheckoutInput!) {
  154. createCheckout(input: { data: $input }) {
  155. checkout {
  156. id
  157. }
  158. }
  159. }
  160. `, token, {
  161. input: content
  162. });
  163. return res;
  164. }
  165. async function newTransactionYamaha(content, token = "") {
  166. var res = await _apollo.default.mutation(`
  167. mutation($input : TransactionInput!){
  168. createTransaction( input:{data:$input} )
  169. {
  170. transaction{
  171. id
  172. }
  173. }
  174. }
  175. `, token, {
  176. input: content
  177. });
  178. return res;
  179. }
  180. async function newTransactionSuzuki(content, token = "") {
  181. var res = await _apollo.default.mutation(`
  182. mutation($input : TransactionInput!){
  183. createTransaction( input:{data:$input} )
  184. {
  185. transactionSuzuki{
  186. id
  187. }
  188. }
  189. }
  190. `, token, {
  191. input: content
  192. });
  193. return res;
  194. }
  195. async function newTransactionHonda(content, token = "") {
  196. var res = await _apollo.default.mutation(`
  197. mutation($input : TransactionInput!){
  198. createTransaction( input:{data:$input} )
  199. {
  200. transactionHonda{
  201. id
  202. }
  203. }
  204. }
  205. `, token, {
  206. input: content
  207. });
  208. return res;
  209. }
  210. async function newTransactionHino(content, token = "") {
  211. var res = await _apollo.default.mutation(`
  212. mutation($input : TransactionInput!){
  213. createTransaction( input:{data:$input} )
  214. {
  215. transactionHino{
  216. id
  217. }
  218. }
  219. }
  220. `, token, {
  221. input: content
  222. });
  223. return res;
  224. }
  225. module.exports = {
  226. newTransactionYamaha: newTransactionYamaha,
  227. newTransactionSuzuki: newTransactionSuzuki,
  228. newTransactionHonda: newTransactionHonda,
  229. newTransactionHino: newTransactionHino,
  230. getTransaction: getTransaction,
  231. getTransactionUnpaid: getTransactionUnpaid,
  232. PayTransactionUnpaid: PayTransactionUnpaid,
  233. getTransactionPrepared: getTransactionPrepared,
  234. getTransactionSending: getTransactionSending,
  235. getTransactionFinished: getTransactionFinished,
  236. AddToCart: AddToCart,
  237. AddToCheckout: AddToCheckout
  238. };
  239. /***/ })
  240. };
  241. ;